-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
85 lines (69 loc) · 2.22 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
import codecs
import os
import pathlib
here = os.path.abspath(os.path.dirname(__file__))
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
def read(*parts):
with codecs.open(os.path.join(here, *parts), "r") as fp:
return fp.read()
def get_version():
# Edited from https://packaging.python.org/guides/single-sourcing-package-version/
init_path = pathlib.Path(__file__).parent / "threedi_api_client/__init__.py"
for line in init_path.open("r").readlines():
if line.startswith("__version__"):
delim = '"' if '"' in line else "'"
return line.split(delim)[1]
else:
raise RuntimeError("Unable to find version string.")
requirements = [
'certifi>=2019.3.9',
'urllib3>=1.24,<2.0',
'six>=1.10',
'python-dateutil',
'sphinx-rtd-theme',
]
aio_requirements = ["aiohttp>=3.6.3,<3.10", "aiofiles>=0.6"]
# Note: mock contains a backport of AsyncMock
test_requirements = ["pytest", "pytest-asyncio", "mock ; python_version<'3.8'", 'pyjwt']
setup(
author="Lars Claussen",
author_email="[email protected]",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
],
description="client for the threedi API",
install_requires=requirements,
license="BSD license",
long_description=readme + "\n\n" + history,
include_package_data=True,
keywords="threedi-api-client",
name="threedi-api-client",
packages=find_packages(
include=[
"openapi_client",
"openapi_client.*",
"threedi_api_client",
"threedi_api_client.*",
]
),
python_requires=">=3.7",
extras_require={
"aio": aio_requirements,
"test": test_requirements,
},
test_suite="tests",
url="https://github.com/nens/threedi-api-client",
version=get_version(),
zip_safe=False,
)