From 68085bdb0135c52828542d159e08e84bfe429518 Mon Sep 17 00:00:00 2001 From: Marcelo Duarte Date: Mon, 10 Jul 2023 22:15:42 -0300 Subject: [PATCH] chore: enable Python 3.12 wheels and remove universal2 --- .github/workflows/build-wheel.yml | 24 ++++++++++++++---------- pyproject.toml | 4 ++-- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-wheel.yml b/.github/workflows/build-wheel.yml index 4d39d285d..2ec130861 100644 --- a/.github/workflows/build-wheel.yml +++ b/.github/workflows/build-wheel.yml @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 7d660c2c8..75dcfa478 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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}