2020-07-23 17:54:47 +02:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
import re
|
|
|
|
|
|
|
|
from setuptools import setup, find_packages
|
|
|
|
|
2020-07-29 21:08:02 +02:00
|
|
|
import pathlib
|
2020-07-23 17:54:47 +02:00
|
|
|
|
2021-09-01 15:59:47 +02:00
|
|
|
here = pathlib.Path(__file__).parent.resolve()
|
|
|
|
long_description = (here / 'README.md').read_text(encoding='utf-8')
|
|
|
|
|
2020-07-23 17:54:47 +02:00
|
|
|
def get_version(package):
|
|
|
|
"""
|
|
|
|
Return package version as listed in `__version__` in `init.py`.
|
|
|
|
"""
|
|
|
|
with open(os.path.join(package, "__init__.py")) as f:
|
|
|
|
return re.search("__version__ = ['\"]([^'\"]+)['\"]", f.read()).group(1)
|
|
|
|
|
|
|
|
|
|
|
|
def get_packages(package):
|
|
|
|
"""
|
|
|
|
Return root package and all sub-packages.
|
|
|
|
"""
|
|
|
|
return [
|
|
|
|
dirpath
|
|
|
|
for dirpath, dirnames, filenames in os.walk(package)
|
|
|
|
if os.path.exists(os.path.join(dirpath, "__init__.py"))
|
|
|
|
]
|
|
|
|
|
|
|
|
module_name="halfapi"
|
|
|
|
setup(
|
|
|
|
name=module_name,
|
|
|
|
version=get_version(module_name),
|
2021-09-01 15:24:21 +02:00
|
|
|
url="https://github.com/halfAPI/halfapi",
|
2021-09-01 15:59:47 +02:00
|
|
|
description="Core to write deep APIs using a module's tree",
|
|
|
|
author="Maxime ALVES",
|
|
|
|
author_email="maxime@freepoteries.fr",
|
|
|
|
license="GPLv3",
|
|
|
|
long_description=long_description,
|
2020-07-23 17:54:47 +02:00
|
|
|
long_description_content_type="text/markdown",
|
|
|
|
packages=get_packages(module_name),
|
2021-09-01 15:59:47 +02:00
|
|
|
python_requires=">=3.8",
|
2020-07-23 17:54:47 +02:00
|
|
|
install_requires=[
|
2023-01-14 11:37:08 +01:00
|
|
|
"PyJWT>=2.6.0,<2.7.0",
|
2023-01-14 11:10:13 +01:00
|
|
|
"starlette>=0.23,<0.24",
|
2023-01-14 11:29:14 +01:00
|
|
|
"click>=8,<9",
|
2021-01-26 01:04:05 +01:00
|
|
|
"uvicorn>=0.13,<1",
|
2023-01-14 11:23:25 +01:00
|
|
|
"orjson>=3.8.5,<4",
|
2023-01-14 11:39:40 +01:00
|
|
|
"pyyaml>=6,<7",
|
2021-11-29 17:01:52 +01:00
|
|
|
"timing-asgi>=0.2.1,<1",
|
2021-12-03 17:25:57 +01:00
|
|
|
"schema>=0.7.4,<1",
|
2023-01-14 11:43:38 +01:00
|
|
|
"toml>=0.10,<0.11",
|
2022-07-06 08:31:00 +02:00
|
|
|
"packaging>=19.0",
|
|
|
|
"python-multipart"
|
2020-07-29 21:08:02 +02:00
|
|
|
],
|
2021-09-01 15:59:47 +02:00
|
|
|
classifiers=[
|
|
|
|
"Development Status :: 3 - Alpha",
|
|
|
|
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
|
|
|
|
"Intended Audience :: Developers",
|
|
|
|
"Topic :: Software Development :: Libraries :: Application Frameworks",
|
2022-07-06 08:31:00 +02:00
|
|
|
"Programming Language :: Python :: 3.7",
|
2021-09-01 15:59:47 +02:00
|
|
|
"Programming Language :: Python :: 3.8",
|
|
|
|
"Programming Language :: Python :: 3.9",
|
2022-07-06 08:31:00 +02:00
|
|
|
"Programming Language :: Python :: 3.10"
|
2021-09-01 15:59:47 +02:00
|
|
|
],
|
2020-07-23 17:54:47 +02:00
|
|
|
extras_require={
|
2020-07-29 21:08:02 +02:00
|
|
|
"tests":[
|
2022-07-06 08:31:00 +02:00
|
|
|
"pytest>=7,<8",
|
2021-05-28 22:30:39 +02:00
|
|
|
"pytest-asyncio",
|
2023-01-14 11:10:13 +01:00
|
|
|
"pylint",
|
|
|
|
"requests",
|
2023-08-01 20:50:58 +02:00
|
|
|
"httpx",
|
|
|
|
"openapi-schema-validator",
|
|
|
|
"openapi-spec-validator"
|
2022-05-17 10:30:12 +02:00
|
|
|
],
|
|
|
|
"pyexcel":[
|
|
|
|
"pyexcel",
|
|
|
|
"pyexcel-ods3",
|
|
|
|
"pyexcel-xlsx"
|
2020-07-29 21:08:02 +02:00
|
|
|
]
|
2020-07-23 17:54:47 +02:00
|
|
|
},
|
|
|
|
entry_points={
|
|
|
|
"console_scripts":[
|
2020-08-05 13:59:46 +02:00
|
|
|
"halfapi=halfapi.cli.cli:cli"
|
2020-07-23 17:54:47 +02:00
|
|
|
]
|
2021-09-01 15:59:47 +02:00
|
|
|
},
|
|
|
|
keywords="web-api development boilerplate",
|
|
|
|
project_urls={
|
|
|
|
"Source": "https://github.com/halfAPI/halfapi",
|
2020-07-23 17:54:47 +02:00
|
|
|
}
|
|
|
|
)
|