-
Notifications
You must be signed in to change notification settings - Fork 5
/
setup.py
74 lines (62 loc) · 2.12 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
import os
import subprocess
import setuptools
def _parse_requirements(requirements_txt_path):
with open(requirements_txt_path) as fp:
return fp.read().splitlines()
extras_require = {
"dev": [
"pre-commit>=2.0.1",
"black>=19.10b0",
"flake8>=3.7",
"flake8-bugbear>=20.1",
"sphinx==4.0.2",
"sphinx-rtd-theme==1.0.0",
"myst-parser==0.15.1",
"nbsphinx==0.8.6",
],
}
if __name__ == "__main__":
with open("README.md") as f:
long_description = f.read()
cwd = os.path.dirname(os.path.abspath(__file__))
version = open("version.txt", "r").read().strip()
sha = "Unknown"
try:
sha = (
subprocess.check_output(["git", "rev-parse", "HEAD"], cwd=cwd)
.decode("ascii")
.strip()
)
except subprocess.CalledProcessError:
pass
if sha != "Unknown" and not os.getenv("PAX_RELEASE_BUILD"):
version += "+" + sha[:7]
version_path = os.path.join(cwd, "pax", "version.py")
with open(version_path, "w") as f:
f.write("__version__ = '{}'\n".format(version))
f.write("git_version = {}\n".format(repr(sha)))
setuptools.setup(
name="pax-rl",
version=version,
description="Pax: Environment for ...",
long_description=long_description,
long_description_content_type="text/markdown",
author="Akbir Khan",
url="https://github.com/ucl-dark/pax",
license="Apache License, Version 2.0",
packages=["pax"],
python_requires=">=3.9",
install_requires=_parse_requirements("requirements.txt"),
extras_require=extras_require,
classifiers=[
"License :: OSI Approved :: Apache Software License",
"Development Status :: 4 - Beta",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Games/Entertainment",
],
)