Skip to content

Commit

Permalink
Update metadata and move CI config to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseFarebro committed Sep 28, 2021
1 parent df92791 commit b7b0c1a
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 32 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/build-ale-py.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
strategy:
matrix:
include:
- config: {"name": "Linux", "os": "ubuntu-latest", "deps": ["zlib", "sdl2"], "arch": "x86_64", "triplet": "x64-linux-mixed"}
- config: {"name": "Windows", "os": "windows-latest", "deps": ["zlib", "sdl2"], "arch": "AMD64", "triplet": "x64-windows"}
- config: {"name": "macOS", "os": "macos-latest", "deps": ["zlib", "sdl2"], "arch": "x86_64", "triplet": "x64-osx-mixed"}
- config: {"name": "macOS", "os": "macos-latest", "deps": ["zlib", "sdl2"], "arch": "arm64", "triplet": "arm64-osx-mixed"}
- config: {"name": "Linux", "os": "ubuntu-latest", "arch": "x86_64", "triplet": "x64-linux-mixed"}
- config: {"name": "Windows", "os": "windows-latest", "arch": "AMD64", "triplet": "x64-windows"}
- config: {"name": "macOS", "os": "macos-latest", "arch": "x86_64", "triplet": "x64-osx-mixed"}
- config: {"name": "macOS", "os": "macos-latest", "arch": "arm64", "triplet": "arm64-osx-mixed"}
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v2
Expand All @@ -32,16 +32,12 @@ jobs:
run: echo "ALE_BUILD_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: Build wheels
uses: pypa/cibuildwheel@v2.1.1
uses: pypa/cibuildwheel@v2.1.2
env:
CIBW_MANYLINUX_X86_64_IMAGE: "ghcr.io/jessefarebro/manylinux2014-vcpkg"
CIBW_SKIP: "*i686* *win32* pp* *cp310*"
CIBW_ARCHS: "${{ matrix.config.arch }}"
CIBW_TEST_REQUIRES: "pytest gym"
CIBW_TEST_COMMAND: "pytest {project}"
CIBW_ENVIRONMENT: "ALE_BUILD_VERSION=${{ env.ALE_BUILD_VERSION }} MACOSX_DEPLOYMENT_TARGET='10.15' VCPKG_DEFAULT_TRIPLET=${{ matrix.config.triplet }}"
CIBW_BEFORE_ALL: >
vcpkg install ${{ join(matrix.config.deps, ' ') }}
vcpkg install zlib sdl2
--overlay-triplets cmake/custom-triplets
--triplet ${{ matrix.config.triplet }}
--feature-flags=-compilertracking
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-ale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,13 @@ jobs:
uses: actions/cache@v2
with:
path: ${{ steps.pip-cache-info.outputs.dir }}
key: ${{ matrix.config.os }}-pip-${{ hashFiles('**/requirements-dev.txt') }}
key: ${{ matrix.config.os }}-pip-${{ hashFiles('**/setup.cfg') }}
restore-keys: |
${{ matrix.config.os }}-pip-
- name: Install pip dependencies
run: |
python -m pip install -r requirements-dev.txt
python -m pip install .[test]
- name: Configure ALE
run: |
Expand Down
15 changes: 13 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
[build-system]
requires = [
"setuptools>=42",
"setuptools>=58",
"wheel",
"cmake>=3.14",
"cmake>=3.18",
"ninja; sys_platform != 'win32' and platform_machine != 'arm64'",
]
build-backend = "setuptools.build_meta"


[tool.cibuildwheel]
skip = "*-win32 *-manylinux_i686 pp* cp310-*"

build-frontend = "build"

test-extras = ["test"]
test-command = "pytest {project}"

manylinux-x86_64-image = "ghcr.io/jessefarebro/manylinux2014-vcpkg"
5 changes: 0 additions & 5 deletions requirements-dev.txt

This file was deleted.

3 changes: 0 additions & 3 deletions requirements.txt

This file was deleted.

22 changes: 12 additions & 10 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
[metadata]
license = GPLv2
license_file = LICENSE.md
name = ale-py
author = Arcade Learning Environment Authors
author = The Arcade Learning Environment Authors
maintainer = Jesse Farebrother
maintainer_email = jfarebro@cs.ualberta.ca
maintainer_email = jfarebro@cs.mcgill.ca
license = GPLv2
license_file = LICENSE.md
description = The Arcade Learning Environment (ALE) - a platform for AI research.
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/mgbellemare/Arcade-Learning-Environment
long_description = file: README.md CHANGELOG.md LICENSE.md
home-page = https://github.com/mgbellemare/Arcade-Learning-Environment
classifiers =
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Expand All @@ -19,9 +18,10 @@ classifiers =
Topic :: Scientific/Engineering :: Artificial Intelligence
keywords = reinforcement-learning arcade-learning-environment atari
project_urls =
Documentation = https://arcadelearningenvironment.org
Documentation = https://github.com/mgbellemare/Arcade-Learning-Environment/tree/master/docs
Source = https://github.com/mgbellemare/Arcade-Learning-Environment
Tracker = https://github.com/mgbellemare/Arcade-Learning-Environment/issues
Changelog = https://github.com/mgbellemare/Arcade-Learning-Environment/blob/master/CHANGELOG.md

[options]
python_requires = >=3.6
Expand All @@ -38,9 +38,11 @@ install_requires =
numpy
importlib-metadata; python_version < '3.8'
importlib-resources
tests_require =
gym

[options.extras_require]
test =
pytest
gym

[options.entry_points]
console_scripts =
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def parse_version(version_file):
# Most config options are in `setup.cfg`. These are the
# only dynamic options we need at build time.
setup(
name="ale-py",
version=parse_version('version.txt'),
distclass=CMakeDistribution,
ext_modules=[CMakeExtension("ale_py._ale_py")],
Expand Down

0 comments on commit b7b0c1a

Please sign in to comment.