Skip to content

Commit

Permalink
Add MANIFEST.in to support python -m build and add sdist to pypi (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pseudo-rnd-thoughts authored Sep 26, 2024
1 parent ac78802 commit 6a7e0ae
Show file tree
Hide file tree
Showing 10 changed files with 66 additions and 33 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.12'
- uses: pre-commit/[email protected]

build-scratch:
Expand Down Expand Up @@ -308,9 +308,9 @@ jobs:

- run: ls

- name: Build
- name: Install ALE wheel
# wildcarding doesn't work for some reason, therefore, update the project version here
run: python -m pip install ale_py-0.10.0-${{ matrix.wheel-name }}.whl
run: python -m pip install ale_py-0.10.1-${{ matrix.wheel-name }}.whl

- name: Install Gymnasium and pytest
run: python -m pip install gymnasium>=1.0.0a2 pytest
Expand Down
35 changes: 28 additions & 7 deletions .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,40 @@ jobs:
id-token: write

steps:
# create the `ale_py-*.*.*.tar.gz` for source building
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- run: pip install setuptools
- run: python setup.py sdist

- uses: actions/download-artifact@v4
with:
name: wheels-windows-latest-AMD64
path: dist

- uses: actions/download-artifact@v4
with:
name: wheels-ubuntu-latest-x86_64
path: dist

- uses: actions/download-artifact@v4
with:
name: wheels-macos-12-x86_64
path: dist

- uses: actions/download-artifact@v4
with:
name: |
wheels-windows-latest-AMD64/
wheels-ubuntu-latest-x86_64/
wheels-macos-12-x86_64/
wheels-macos-12-arm64/
path: wheels
name: wheels-macos-12-arm64
path: dist

- run: ls dist/

- name: Publish to PyPi test
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages-dir: wheels/
packages-dir: dist/
print-hash: true
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [0.10.1](https://github.com/Farama-Foundation/Arcade-Learning-Environment/compare/v0.10.0...v0.10.1) - 2024-10-26

Revert change to requirements that `numpy < 2.0` and add support for building from source distribution, `tar.gz` (though not recommended).

## [0.10.0](https://github.com/Farama-Foundation/Arcade-Learning-Environment/compare/v0.9.1...v0.10.0) - 2024-10-23

In v0.10, ALE now has its own dedicated website, https://ale.farama.org/ with Atari's documentation being moved from Gymnasium.
Expand Down
8 changes: 4 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ project(ale VERSION ${ALE_DEFAULT_VERSION}
add_subdirectory(src/ale)

# Only include tests in the main project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
enable_testing()
add_subdirectory(tests)
endif()
# if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# enable_testing()
# add_subdirectory(tests)
# endif()
7 changes: 7 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# MANIFEST.in
include version.txt
include vcpkg.json
include CMakeLists.txt
recursive-include cmake *
include scripts/*
recursive-include src *
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ visualization
:hidden:
:caption: Development
Github <https://github.com/Farama-Foundation/arcade-Learning-Environment>
Github <https://github.com/Farama-Foundation/Arcade-Learning-Environment>
release_notes/index
Contribute to the Docs <https://github.com/Farama-Foundation/arcade-Learning-Environment/blob/main/docs/README.md>
Contribute to the Docs <https://github.com/Farama-Foundation/Arcade-Learning-Environment/blob/main/docs/README.md>
```
2 changes: 1 addition & 1 deletion docs/release_notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ title: Release Notes

```{eval-rst}
.. changelog::
:github: https://github.com/Farama-Foundation/Arcade-Learning-Environment
:github: https://github.com/Farama-Foundation/Arcade-Learning-Environment/releases
:pypi: https://pypi.org/project/ale-py/
:changelog-url:
```
28 changes: 14 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ requires-python = ">=3.8"
license = {text = "GPLv2"}
keywords = ["reinforcement-learning", "arcade-learning-environment", "atari"]
authors = [
{name = "Marc G. Bellemare"},
{name = "Yavar Naddaf"},
{name = "Joel Veness"},
{name = "Michael Bowling"},
{name = "Marc G. Bellemare"},
{name = "Yavar Naddaf"},
{name = "Joel Veness"},
{name = "Michael Bowling"},
]
maintainers = [
{name = "Farama Foundation", email = "[email protected]"},
{name = "Jesse Farebrother", email = "[email protected]"},
{name = "Farama Foundation", email = "[email protected]"},
{name = "Jesse Farebrother", email = "[email protected]"},
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -37,17 +37,17 @@ classifiers = [
"Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
"numpy<2.0",
"importlib-metadata>=4.10.0; python_version < '3.10'",
"importlib-resources; python_version < '3.9'",
"typing-extensions; python_version < '3.11'"
"numpy>1.20",
"importlib-metadata>=4.10.0; python_version < '3.10'",
"importlib-resources; python_version < '3.9'",
"typing-extensions; python_version < '3.11'"
]
dynamic = ["version"]

[project.optional-dependencies]
test = [
"pytest>=7.0",
"gymnasium>=1.0.0a1",
"pytest>=7.0",
"gymnasium>=1.0.0a1",
]

[project.urls]
Expand All @@ -57,8 +57,8 @@ changelog = "https://github.com/Farama-Foundation/Arcade-Learning-Environment/bl

[tool.setuptools]
packages = [
"ale_py",
"ale_py.roms",
"ale_py",
"ale_py.roms",
]
package-dir = {ale_py = "src/ale/python"}
package-data = {"ale_py" = ["py.typed", "*.pyi", "**/*.pyi"], "ale_py.roms" = ["md5.json", "*.bin"]}
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json",
"name": "arcade-learning-environment",
"version": "0.10.0",
"version": "0.10.1",
"dependencies": [
"zlib"
],
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.10.0
0.10.1

0 comments on commit 6a7e0ae

Please sign in to comment.