-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.py
88 lines (79 loc) · 2.83 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
86
87
88
"""Setups up the Shimmy module."""
from setuptools import find_packages, setup
def get_description():
"""Gets the description from the readme."""
with open("README.md", encoding="utf-8") as fh:
long_description = ""
header_count = 0
for line in fh:
if line.startswith("##"):
header_count += 1
if header_count < 2:
long_description += line
else:
break
return header_count, long_description
def get_version():
"""Gets the shimmy version."""
path = "shimmy/__init__.py"
with open(path) as file:
lines = file.readlines()
for line in lines:
if line.startswith("__version__"):
return line.strip().split()[-1].strip().strip('"')
raise RuntimeError("bad version data in __init__.py")
version = get_version()
header_count, long_description = get_description()
extras = {
"gym-v21": ["gym>=0.21.0", "pyglet==1.5.11"],
"gym-v26": ["gym>=0.26.2"],
"atari": ["ale-py~=0.8.1"],
# "imageio" should be "gymnasium[mujoco]>=0.26" but there are install conflicts
"dm-control": ["dm-control>=1.0.10", "imageio", "h5py>=3.7.0"],
"dm-control-multi-agent": [
"dm-control>=1.0.10",
"imageio",
"h5py>=3.7.0",
"pettingzoo>=1.22.3",
],
"dm-lab": ["dm-env>=1.6"],
"openspiel": ["open_spiel>=1.2", "pettingzoo>=1.22.3"],
"meltingpot": ["pettingzoo>=1.22.3"],
"bsuite": ["bsuite>=0.3.5"],
}
extras["all"] = list({lib for libs in extras.values() for lib in libs})
extras["testing"] = [
"pytest==7.1.3",
"pillow>=9.3.0",
"autorom[accept-rom-license]~=0.6.0",
]
setup(
name="Shimmy",
version=version,
author="Farama Foundation",
author_email="contact@farama.org",
description="An API conversion tool providing Gymnasium and PettingZoo bindings for popular external reinforcement learning environments.",
url="https://github.com/Farama-Foundation/Shimmy",
license_files=("LICENSE.txt",),
long_description=long_description,
long_description_content_type="text/markdown",
keywords=["Reinforcement Learning", "game", "RL", "AI"],
python_requires=">=3.7",
packages=find_packages(),
install_requires=["numpy>=1.18.0", "gymnasium>=0.27.0"],
tests_require=extras["testing"],
extras_require=extras,
classifiers=[
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
include_package_data=True,
entry_points={
"gymnasium.envs": ["__root__ = shimmy.registration:register_gymnasium_envs"]
},
)