Skip to content

Commit 1690081

Browse files
committed
Test experimental branch of delocate.
Update MacOS to use SDL 2.0.14, a version known to have issues with delocate.
1 parent 9962641 commit 1690081

File tree

2 files changed

+37
-8
lines changed

2 files changed

+37
-8
lines changed

.github/workflows/python-package-macos.yml

Lines changed: 36 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,25 +41,56 @@ jobs:
4141
- name: Install Python dependencies
4242
run: |
4343
python -m pip install --upgrade pip
44-
python -m pip install pytest pytest-cov pytest-benchmark delocate wheel twine
44+
python -m pip install pytest pytest-cov pytest-benchmark wheel twine
45+
python -m pip install git+https://github.com/HexDecimal/delocate.git@loader_path
4546
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
4647
- name: Build package.
4748
env:
4849
TCOD_TAG: ${{ github.event.release.tag_name }}
4950
run: |
5051
python setup.py sdist develop bdist_wheel --py-limited-api=cp35
51-
- name: Package binary files
52-
run: |
53-
delocate-wheel -v dist/*.whl
54-
delocate-listdeps --all dist/*.whl
5552
- name: Test with pytest
5653
run: |
5754
pytest --no-window --cov-report=xml
5855
- uses: codecov/codecov-action@v1
56+
- name: Package binary files
57+
run: |
58+
delocate-wheel -v dist/*.whl
59+
delocate-listdeps --all dist/*.whl
60+
- name: Archive wheel
61+
uses: actions/upload-artifact@v2
62+
with:
63+
name: wheel-macos
64+
path: dist/*.whl
65+
retention-days: 1
5966
- name: Upload to PyPI
6067
if: github.event_name == 'release'
6168
env:
6269
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
6370
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
6471
run: |
6572
twine upload --skip-existing dist/*
73+
74+
isolated_test:
75+
name: Verify wheel dependencies
76+
needs: build
77+
runs-on: ${{ matrix.os }}
78+
strategy:
79+
matrix:
80+
os: ['macos-11.0']
81+
python-version: ['3.7.9']
82+
steps:
83+
- name: Set up Python ${{ matrix.python-version }}
84+
uses: actions/setup-python@v2
85+
with:
86+
python-version: ${{ matrix.python-version }}
87+
- uses: actions/download-artifact@v2
88+
with:
89+
name: wheel-macos
90+
path: dist
91+
- name: Install tcod from wheel
92+
run: |
93+
python -m pip install dist/*.whl
94+
- name: Verify dependency correctness
95+
run: |
96+
python -c "import tcod"

build_libtcod.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@
2727
# The SDL2 version to include in binary distributions.
2828
# MacOS delocate-wheel will fail without throwing an error when bundling
2929
# modern versions of SDL.
30-
SDL2_BUNDLE_VERSION = os.environ.get(
31-
"SDL_VERSION", "2.0.10" if sys.platform == "darwin" else "2.0.14"
32-
)
30+
SDL2_BUNDLE_VERSION = os.environ.get("SDL_VERSION", "2.0.14")
3331

3432
HEADER_PARSE_PATHS = ("tcod/", "libtcod/src/libtcod/")
3533
HEADER_PARSE_EXCLUDES = ("gl2_ext_.h", "renderer_gl_internal.h", "event.h")

0 commit comments

Comments
 (0)