Skip to content

Commit fa48461

Browse files
Fix Windows and Ubuntu CI (#601)
1 parent 1081e90 commit fa48461

File tree

5 files changed

+27
-34
lines changed

5 files changed

+27
-34
lines changed

.github/docker/manylinux-vcpkg.Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ FROM quay.io/pypa/manylinux2014_x86_64
22

33
LABEL org.opencontainers.image.source=https://github.com/Farama-Foundation/Arcade-Learning-Environment
44

5-
RUN yum install -y curl unzip zip tar
5+
RUN yum install -y curl unzip zip tar glibc-static
66

7+
# Install vcpkg
78
RUN git clone https://github.com/Microsoft/vcpkg.git /opt/vcpkg
8-
RUN cd /opt/vcpkg && git reset --hard 8150939b6
9-
9+
RUN cd /opt/vcpkg && git reset --hard 9b75e789ece3f942159b8500584e35aafe3979ff
1010

1111
ENV VCPKG_INSTALLATION_ROOT="/opt/vcpkg"
1212
ENV PATH="${PATH}:/opt/vcpkg"

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ jobs:
117117
run: ./scripts/download_unpack_roms.sh
118118

119119
- name: Build wheels
120-
uses: pypa/cibuildwheel@v2.21.3
120+
uses: pypa/cibuildwheel@v2.23.2
121121
env:
122122
CIBW_ARCHS: "${{ matrix.arch }}"
123123

pyproject.toml

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
22
requires = [
3-
"setuptools>=61",
3+
"setuptools>=77.0.0",
44
]
55
build-backend = "setuptools.build_meta"
66

@@ -9,7 +9,8 @@ name = "ale-py"
99
description = "The Arcade Learning Environment (ALE) - a platform for AI research."
1010
readme = "README.md"
1111
requires-python = ">=3.9"
12-
license = {text = "GPLv2"}
12+
license = "GPL-2.0-only"
13+
license-files = ["LICENSE.md"]
1314
keywords = ["reinforcement-learning", "arcade-learning-environment", "atari"]
1415
authors = [
1516
{name = "Marc G. Bellemare"},
@@ -24,7 +25,6 @@ maintainers = [
2425
classifiers = [
2526
"Development Status :: 5 - Production/Stable",
2627
"Intended Audience :: Science/Research",
27-
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
2828
"Programming Language :: Python :: 3",
2929
"Programming Language :: Python :: 3.9",
3030
"Programming Language :: Python :: 3.10",
@@ -72,7 +72,6 @@ norecursedirs = ["vcpkg", "build"]
7272
skip = ["*-win32", "*i686", "pp*", "*-musllinux*"]
7373

7474
build-frontend = "build"
75-
7675
manylinux-x86_64-image = "manylinux-vcpkg:latest"
7776

7877
[tool.cibuildwheel.linux]
@@ -81,12 +80,12 @@ environment-pass = ["GITHUB_REF"]
8180
# macOS x86-64
8281
[[tool.cibuildwheel.overrides]]
8382
select = "*-macosx_x86_64"
84-
environment = { PIP_ONLY_BINARY = "numpy", VCPKG_DEFAULT_TRIPLET = "x64-osx-mixed", VCPKG_FEATURE_FLAGS = "-compilertracking", MACOSX_DEPLOYMENT_TARGET = "10.15" }
83+
environment = { PIP_ONLY_BINARY = "numpy", VCPKG_DEFAULT_TRIPLET = "x64-osx-mixed", VCPKG_FEATURE_FLAGS = "-compilertracking", MACOSX_DEPLOYMENT_TARGET = "13.0" }
8584

8685
# macOS arm64
8786
[[tool.cibuildwheel.overrides]]
8887
select = "*-macosx_arm64"
89-
environment = { PIP_ONLY_BINARY = "numpy", VCPKG_DEFAULT_TRIPLET = "arm64-osx-mixed", VCPKG_FEATURE_FLAGS = "-compilertracking", MACOSX_DEPLOYMENT_TARGET = "10.15" }
88+
environment = { PIP_ONLY_BINARY = "numpy", VCPKG_DEFAULT_TRIPLET = "arm64-osx-mixed", VCPKG_FEATURE_FLAGS = "-compilertracking", MACOSX_DEPLOYMENT_TARGET = "13.0" }
9089

9190
# Windows x64
9291
[[tool.cibuildwheel.overrides]]

src/ale/python/__init__.py

+6-21
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
"""Python module for interacting with ALE c++ interface and gymnasium wrapper."""
22

3+
import importlib.metadata as metadata
34
import os
45
import platform
5-
import sys
66
import warnings
77

88
packagedir = os.path.abspath(os.path.dirname(__file__))
@@ -23,28 +23,13 @@
2323
)
2424

2525
# Loading DLLs on Windows is kind of a disaster
26-
# The best approach seems to be using LoadLibraryEx
27-
# with user defined search paths. This kind of acts like
28-
# $ORIGIN or @loader_path on Unix / macOS.
26+
# The best approach seems to be using LoadLibraryEx with user defined search paths.
27+
# This kind of acts like $ORIGIN or @loader_path on Unix / macOS.
2928
# This way we guarantee we load OUR DLLs.
30-
if sys.version_info.major == 3 and sys.version_info.minor >= 8:
31-
os.add_dll_directory(packagedir)
32-
else:
33-
# TODO: Py38: Remove AddDllDirectory
34-
kernel32 = ctypes.WinDLL("kernel32.dll", use_last_error=True)
35-
if hasattr(kernel32, "AddDllDirectory"):
36-
kernel32.AddDllDirectory(packagedir)
29+
os.add_dll_directory(packagedir)
3730

38-
# TODO Py38: Once 3.7 is deprecated use importlib.metadata to parse
39-
# version string from package.
40-
try:
41-
import importlib.metadata as metadata
42-
except ImportError:
43-
import importlib_metadata as metadata
44-
try:
45-
__version__ = metadata.version(__package__)
46-
except metadata.PackageNotFoundError:
47-
__version__ = "unknown"
31+
32+
__version__ = metadata.version(__package__)
4833

4934
# Import native shared library
5035
from ale_py._ale_py import ( # noqa: E402

vcpkg.json

+12-3
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,20 @@
88
"features": {
99
"sdl": {
1010
"description": "Enable SDL, this enables display and audio support.",
11-
"dependencies": [ "sdl2" ]
11+
"dependencies": [
12+
{
13+
"name": "sdl2",
14+
"default-features": false,
15+
"features": []
16+
}
17+
]
1218
}
1319
},
14-
"builtin-baseline": "9aa0d66373ce3a6868d12353d0d4960db0d4bd18",
20+
"builtin-baseline": "0ca64b4e1c70fa6d9f53b369b8f3f0843797c20c",
1521
"overrides": [
16-
{ "name": "sdl2", "version": "2.24.2" }
22+
{
23+
"name": "sdl2",
24+
"version": "2.30.11"
25+
}
1726
]
1827
}

0 commit comments

Comments
 (0)