-
Notifications
You must be signed in to change notification settings - Fork 62
/
setup.py
executable file
·70 lines (60 loc) · 1.86 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
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
import re
import os
from typing import List
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(CURRENT_DIR, "README.md"), encoding="utf-8") as f:
long_description = f.read()
def parse_requirements(path: str) -> List[str]:
with open(os.path.join(CURRENT_DIR, path)) as f:
return [
line.rstrip() for line in f if not (line.isspace() or line.startswith("#"))
]
VERSIONFILE = "gymnax/_version.py"
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
else:
raise RuntimeError("Unable to find version string in %s." % (VERSIONFILE,))
git_tar = f"https://github.com/RobertTLange/gymnax/archive/v{verstr}.tar.gz"
requires = [
"jax",
"jaxlib",
"chex",
"flax",
"pyyaml",
"gym>=0.26",
"gymnasium",
"matplotlib",
"seaborn",
]
test_requires = ["bsuite", "minatar", "brax"]
setup(
name="gymnax",
version=verstr,
author="Robert Tjarko Lange",
author_email="[email protected]",
description="JAX-compatible version of Open AI's gym environments",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/RobertTLange/gymnax",
download_url=git_tar,
classifiers=[
"Programming Language :: Python :: 3.10",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
],
packages=find_packages(),
include_package_data=True,
zip_safe=False,
platforms="any",
python_requires=">=3.10",
install_requires=requires,
tests_require=test_requires,
)