forked from facebookresearch/nle
-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathpyproject.toml
More file actions
117 lines (97 loc) · 3.6 KB
/
pyproject.toml
File metadata and controls
117 lines (97 loc) · 3.6 KB
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
[project]
name = "nle"
dynamic = ["version"]
description = "The NetHack Learning Environment (NLE): a reinforcement learning environment based on NetHack"
readme = "README.md"
authors = [{ name = "The NLE Dev Team" }]
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: Nethack General Public License",
"Development Status :: 5 - Production/Stable",
"Operating System :: POSIX :: Linux",
"Operating System :: MacOS",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: C",
"Programming Language :: C++",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Games/Entertainment",
]
dependencies = ["pybind11>=2.2", "numpy>=1.16", "gymnasium==1.2.0"]
[project.license]
file = "LICENSE"
[project.urls]
Homepage = "https://github.com/NetHack-LE/nle"
[build-system]
# Lock build-deps as uv does not yet support locking of build deps: astral-sh/uv#5190
requires = ["scikit-build-core~=0.10", "pybind11~=2.2", "setuptools-scm~=9.2.2"]
build-backend = "scikit_build_core.build"
[tool.scikit-build]
cmake.build-type = "Release"
cmake.args = ["-DHACKDIR=nle/nethackdir", "-DPYTHON_PACKAGE_NAME=nle"]
minimum-version = "build-system.requires"
metadata.version.provider = "scikit_build_core.metadata.setuptools_scm"
generate = [
{ path = "nle/version.py", template = '__version__ = "${version}"' },
]
[tool.setuptools_scm]
# This section is necessary to activate setuptools-scm, but can be empty
[project.scripts]
nle-play = "nle.scripts.play:main"
nle-ttyrec = "nle.scripts.ttyrec:main"
nle-ttyplay = "nle.scripts.ttyplay:main"
nle-ttyplay2 = "nle.scripts.ttyplay2:main"
nle-read-tty = "nle.scripts.read_tty:main"
[dependency-groups]
dev = ["nle[dev]"]
[project.optional-dependencies]
agent = ["torch>=1.3.1"]
dev = [
"pre-commit>=2.0.1",
"cmake_format>=0.6.10",
"memory-profiler>=0.60.0",
"pytest>=6.2.5",
"pytest-benchmark>=3.4.1",
"sphinx>=2.4.4",
"sphinx-rtd-theme>=0.4.3",
"setuptools>=69.5.1",
"ruff==0.4.3",
]
all = ["nle[agent,dev]"]
[tool.ruff]
# See https://docs.astral.sh/ruff/rules/.
extend-exclude = ["third_party"]
exclude = ["win/rl/nle"]
[tool.ruff.lint]
ignore = ["B008", "B905", "C901", "E501", "E731"]
select = ["B", "B9", "C", "E", "F", "I", "R", "W"]
[tool.ruff.lint.flake8-comprehensions]
allow-dict-calls-with-keyword-arguments = true
[tool.ruff.lint.per-file-ignores]
"__init__.py" = ["F401"] # unused-import.
[tool.ruff.lint.isort]
force-single-line = true
[tool.cibuildwheel]
# We need to build wheels for the following Python versions:
build = "cp{310,311,312,313}-*"
[tool.cibuildwheel.linux]
# Only manylinux is supported (no musllinux)
build = "cp{310,311,312,313}-manylinux*"
# We need to clean up the build directory, all .so files, and CMakeCache.txt
# and install the dependencies using yum, as manylinux2014 image is CentOS 7-based
before-all = "rm -rf {project}/build {project}/*.so {project}/CMakeCache.txt && yum install -y autoconf bison cmake flex git libtool"
# Build for the architecure of the runner in the GitHub Actions workflow:
# ubuntu-latest -> x86_64
# ubuntu-24.04-arm -> aarch64
archs = "native"
# Use manylinux2014 image for both x86_64 and aarch64
manylinux-x86_64-image = "manylinux2014"
manylinux-aarch64-image = "manylinux2014"
[tool.cibuildwheel.macos]
# For macOS wheels, we only need to install cmake
before-all = "rm -rf {project}/build {project}/*.so {project}/CMakeCache.txt && brew install cmake"
[tool.pytest.ini_options]
testpaths = ["nle/tests"]