Skip to content

Commit

Permalink
chore: enable Python 3.12 wheels and remove universal2 (#1958)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcelotduarte authored Jul 11, 2023
1 parent af3412a commit feb0276
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
24 changes: 14 additions & 10 deletions .github/workflows/build-wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ jobs:
os: [macos-latest, ubuntu-latest, windows-latest]
name: Build wheel on [${{ matrix.os }}]
runs-on: ${{ matrix.os }}

steps:

- uses: actions/checkout@v3

- uses: actions/setup-python@v4
Expand All @@ -32,7 +32,11 @@ jobs:
shell: bash

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
run: python -m cibuildwheel --output-dir wheelhouse --prerelease-pythons

- name: Add sdist
if: runner.os == 'Linux'
run: python setup.py sdist -d wheelhouse

- name: Upload the artifact
uses: actions/upload-artifact@v3
Expand All @@ -41,12 +45,17 @@ jobs:
path: wheelhouse

publish:
name: Publish package to PyPI
needs:
- build_wheel
runs-on: ubuntu-latest
name: Publish package to PyPI

environment:
name: pypi
url: https://pypi.org/p/cx-Freeze
permissions:
id-token: write
steps:

- uses: actions/checkout@v3

- name: Setup Python
Expand All @@ -61,15 +70,10 @@ jobs:
name: cx-freeze-wheelhouse
path: wheelhouse

- name: Add sdist
run: python setup.py sdist -d wheelhouse/

- name: Publish package to PyPI
if: github.event_name == 'release' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
packages-dir: wheelhouse/
skip-existing: true
verbose: true
Expand All @@ -79,8 +83,8 @@ jobs:
- build_wheel
runs-on: ubuntu-latest
name: Update cx_Freeze/bases and util module

steps:

- uses: actions/checkout@v3
with:
fetch-depth: 0
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ cd /opt/_internal && tar -xvf static-libs-for-embedding-only.tar.xz
repair-wheel-command = "auditwheel repair -L /bases/lib -w {dest_dir} {wheel}"

[tool.cibuildwheel.macos]
archs = "x86_64 universal2 arm64"
skip = "cp38-macosx_universal2 cp38-macosx_arm64"
archs = "x86_64 arm64"
skip = "cp38-macosx_arm64"
repair-wheel-command = """
delocate-listdeps {wheel} &&
delocate-wheel --require-archs {delocate_archs} -L bases/lib -w {dest_dir} {wheel}
Expand Down

0 comments on commit feb0276

Please sign in to comment.