-
Notifications
You must be signed in to change notification settings - Fork 57
/
setup.py
135 lines (122 loc) · 3.78 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#!/usr/bin/env python
#
# Copyright (c) Facebook, Inc. and its affiliates.
#
# MINIHACK_RELEASE_BUILD
# If set, builds wheel (s)dist such as to prepare it for upload to PyPI.
#
import os
import setuptools
import subprocess
packages = [
"minihack",
"minihack.envs",
"minihack.scripts",
"minihack.tiles",
"minihack.tests",
"minihack.agent",
"minihack.agent.polybeast",
"minihack.agent.polybeast.models",
"minihack.agent.polybeast.core",
"minihack.agent.rllib",
"minihack.agent.common",
"minihack.agent.common.envs",
"minihack.agent.common.models",
"minihack.agent.common.util",
]
entry_points = {
"console_scripts": [
"mh-play = minihack.scripts.play:main",
"mh-guiplay = minihack.scripts.play_gui:main",
"mh-envs = minihack.scripts.env_list:main",
]
}
install_requires = ["numpy>=1.16", "gym>=0.15,<=0.23"]
if not os.getenv("READTHEDOCS"):
install_requires.append("nle==0.9.0")
extras_deps = {
"dev": [
"pre-commit>=2.0.1",
"black>=19.10b0",
"flake8>=3.7",
"flake8-bugbear>=20.1",
"pytest>=5.3",
"pytest-benchmark>=3.1.0",
"sphinx==4.0.2",
"sphinx-rtd-theme==1.0.0",
"myst-parser==0.15.1",
"nbsphinx==0.8.6",
],
"polybeast": [
"torch>=1.3.1",
"hydra-core>=1.0.0",
"hydra-colorlog>=1.0.0",
"hydra-submitit-launcher>=1.1.1",
"wandb>=0.10.31",
"pyyaml",
],
"rllib": [
"torch>=1.3.1",
"ray[rllib]==1.3.0",
"ray[default]==1.3.0",
"hydra-core>=1.0.0",
"hydra-colorlog>=1.0.0",
"hydra-submitit-launcher>=1.1.1",
"wandb>=0.10.31",
],
"wiki": [
"inflect",
"stanza",
],
}
extras_deps["all"] = [item for group in extras_deps.values() for item in group]
if __name__ == "__main__":
with open("README.md") as f:
long_description = f.read()
cwd = os.path.dirname(os.path.abspath(__file__))
sha = "Unknown"
version = open("version.txt", "r").read().strip()
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("MINIHACK_RELEASE_BUILD"):
version += "+" + sha[:7]
print("Building wheel {}-{}".format("minihack", version))
version_path = os.path.join(cwd, "minihack", "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="minihack",
version=version,
description="MiniHack The Planet: "
+ "A Sandbox for Open-Ended Reinforcement Learning Research",
long_description=long_description,
long_description_content_type="text/markdown",
author="The MiniHack Team",
url="https://github.com/facebookresearch/minihack",
license="Apache License, Version 2.0",
entry_points=entry_points,
packages=packages,
install_requires=install_requires,
extras_require=extras_deps,
python_requires=">=3.7",
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.8",
"Programming Language :: Python :: 3.9",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Games/Entertainment",
],
zip_safe=False,
include_package_data=True,
)