Skip to content

Commit

Permalink
hacky gymnasium register
Browse files Browse the repository at this point in the history
  • Loading branch information
jjshoots committed Feb 7, 2024
1 parent df4eb09 commit e4552e5
Show file tree
Hide file tree
Showing 9 changed files with 798 additions and 140 deletions.
24 changes: 3 additions & 21 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,29 +42,17 @@ dynamic = ["version"]
[project.optional-dependencies]
test = [
"pytest>=7.0",
"gym~=0.23",
"gymnasium",
]

[project.urls]
homepage = "https://github.com/mgbellemare/Arcade-Learning-Environment"
documentation = "https://github.com/mgbellemare/Arcade-Learning-Environment/tree/master/docs"
changelog = "https://github.com/mgbellemare/Arcade-Learning-Environment/blob/master/CHANGELOG.md"

[project.scripts]
ale-import-roms = "ale_py.scripts.import_roms:main"

[project.entry-points."gym.envs"]
ALE = "ale_py.gym:register_gym_envs"
__internal__ = "ale_py.gym:register_legacy_gym_envs"

[tool.setuptools]
packages = [
"ale_py",
"ale_py.roms",
"ale_py.env",
"ale_py.scripts"
]
package-dir = {ale_py = "src/python", gym = "src/gym"}
packages = ["ale_py", "ale_py.roms"]
package-dir = {ale_py = "src/python"}
package-data = {"ale_py" = ["py.typed", "*.pyi", "**/*.pyi"], "ale_py.roms" = ["*.bin", "md5.txt"]}

[tool.pytest.ini_options]
Expand All @@ -79,12 +67,6 @@ skip = ["*-win32", "*i686", "pp*", "*-musllinux*"]

build-frontend = "build"

# Test configuration
# test-extras = ["test"]
# TODO(jfarebro): Temporarily use upstream Gym until v26 release.
test-requires = ["pytest", "git+https://github.com/openai/gym#egg=gym"]
test-command = "pytest {project}"

# vcpkg manylinux images
manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux2014_x86_64-vcpkg"

Expand Down
8 changes: 4 additions & 4 deletions src/python/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
ctypes.CDLL("msvcp140.dll")
except OSError:
raise OSError(
"""Microsoft Visual C++ Redistribution Pack is not installed.
It can be downloaded from https://aka.ms/vs/16/release/vc_redist.x64.exe."""
"Microsoft Visual C++ Redistribution Pack is not installed. \n"
"It can be downloaded from https://aka.ms/vs/16/release/vc_redist.x64.exe."
)

# Loading DLLs on Windows is kind of a disaster
Expand Down Expand Up @@ -50,5 +50,5 @@
__all__ = ["Action", "ALEInterface", "ALEState", "LoggerMode", "SDL_SUPPORT"]


from .register_gymnasium import register_gymnasium_envs
register_gymnasium_envs()
from .register_gymnasium import register_gymnasium
register_gymnasium()
Loading

0 comments on commit e4552e5

Please sign in to comment.