-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.py
67 lines (55 loc) · 1.73 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
import os
import re
from setuptools import find_packages, setup
SCRIPT_DIR = os.path.abspath(os.path.dirname(__file__))
def get_version():
"""
Return package version as listed in `__version__` in `init.py`.
"""
with open(
os.path.join(SCRIPT_DIR, "oasis_data_manager", "__init__.py"), encoding="utf-8"
) as init_py:
return re.search("__version__ = ['\"]([^'\"]+)['\"]", init_py.read()).group(1)
def get_install_requirements():
with open(
os.path.join(SCRIPT_DIR, "requirements-package.in"), encoding="utf-8"
) as reqs:
return reqs.readlines()
def get_optional_requirements():
with open(
os.path.join(SCRIPT_DIR, "optional-package.in"), encoding="utf-8"
) as reqs:
return {"extra": reqs.readlines()}
version = get_version()
setup(
name="oasis-data-manager",
version=version,
packages=find_packages(exclude=("tests", "tests.*", "tests.*.*")),
include_package_data=True,
package_data={
"": [
"LICENSE",
],
},
exclude_package_data={
"": ["__pycache__", "*.py[co]"],
},
license="BSD 3-Clause",
description="",
long_description="",
long_description_content_type="text/markdown",
url="https://github.com/OasisLMF/OasisDataManager",
author="Oasis LMF",
author_email="[email protected]",
keywords="",
python_requires=">=3.6",
install_requires=get_install_requirements(),
extras_require=get_optional_requirements(),
classifiers=[
"Development Status :: 4 - Beta",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python",
"Programming Language :: Python :: 3.6",
],
)