-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
76 lines (62 loc) · 2.07 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
import os
from setuptools import find_packages, setup
def read(rel_path: str) -> str:
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, rel_path), encoding="utf-8") as fp:
return fp.read()
# Package meta-data.
NAME = "abl"
DESCRIPTION = "abl package project"
REQUIRES_PYTHON = ">=3.8.0"
VERSION = None
# BEFORE importing setuptools, remove MANIFEST. Otherwise it may not be
# properly updated when the contents of directories change (true for distutils,
# not sure about setuptools).
if os.path.exists("MANIFEST"):
os.remove("MANIFEST")
here = os.path.abspath(os.path.dirname(__file__))
# What packages are required for this module to be executed?
try:
with open(os.path.join(here, "requirements.txt"), encoding="utf-8") as f:
REQUIRED = f.read().split("\n")
except:
REQUIRED = []
EXTRAS = {
"test": [
"pytest-cov",
"black==22.10.0",
],
}
with open(os.path.join(here, "readme.md"), encoding="utf-8") as f:
long_description = f.read()
# Load the package's __version__.py module as a dictionary.
about = {}
if not VERSION:
with open(os.path.join(here, NAME, "__version__.py")) as f:
exec(f.read(), about)
else:
about["__version__"] = VERSION
if __name__ == "__main__":
setup(
name=NAME,
version=about["__version__"],
license="MIT Licence",
packages=find_packages(),
include_package_data=True,
description=DESCRIPTION,
long_description=long_description,
long_description_content_type="text/markdown",
python_requires=REQUIRES_PYTHON,
install_requires=REQUIRED,
extras_require=EXTRAS,
classifiers=[
'Development Status :: 3 - Alpha',
"Intended Audience :: Science/Research",
"Intended Audience :: Developers",
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Scientific/Engineering",
"Operating System :: POSIX :: Linux",
"Programming Language :: Python :: 3.8",
],
)