diff --git a/.github/workflows/create_wheels.yaml b/.github/workflows/create_wheels.yaml index 94373be..e472fbc 100644 --- a/.github/workflows/create_wheels.yaml +++ b/.github/workflows/create_wheels.yaml @@ -15,10 +15,9 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - python-version: [37, 38, 39, 310, 311] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up QEMU if: runner.os == 'Linux' @@ -26,22 +25,17 @@ jobs: with: platforms: all - - name: Setup rust - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Build wheels - uses: pypa/cibuildwheel@v2.11.3 + uses: pypa/cibuildwheel@v3.0.0 env: - CIBW_BUILD: cp${{matrix.python-version}}-* + CIBW_BUILD: cp38-* CIBW_ENVIRONMENT: 'PATH="$HOME/.cargo/bin:$PATH" CARGO_TERM_COLOR="always"' CIBW_ENVIRONMENT_WINDOWS: 'PATH="$UserProfile\.cargo\bin;$PATH"' - name: Upload Binaries - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-${{ matrix.os }} path: wheelhouse test-wheels: @@ -49,20 +43,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [3.7, 3.8, 3.9, '3.10', '3.11'] os: [macos-latest, ubuntu-latest, windows-latest] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: path: py_cpp_demangle_source - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: wheels - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + name: wheels-${{ matrix.os }} + - name: Set up Python + uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version: 3.x - name: Install wheel run: | pip install --force-reinstall --no-deps --no-index --find-links . cpp-demangle @@ -76,17 +69,18 @@ jobs: if: "startsWith(github.ref, 'refs/tags/')" needs: [test-wheels] steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: - name: wheels + pattern: wheels-* + merge-multiple: true - name: Create GitHub Release uses: fnkr/github-action-ghr@v1.3 env: GHR_PATH: . GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v5 with: - python-version: 3.9 + python-version: 3.x - name: Push to PyPi env: TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} diff --git a/Cargo.toml b/Cargo.toml index 6401b55..567897a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,4 +13,4 @@ cpp_demangle = "0.4.0" [dependencies.pyo3] version = "0.17.3" -features = ["extension-module"] +features = ["extension-module", "abi3"] diff --git a/pyproject.toml b/pyproject.toml index 67d2c50..4c9e6a1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,10 +2,10 @@ # skip testing in the cibuildwheel phase, will install the wheels later # and verify test-command = "" -skip = ["pp*", "*musl*", "*-manylinux_i686", "*win32"] +skip = ["*musl*", "*-manylinux_i686", "*win32"] -[tool.cibuildwheel.macos] -archs = ["x86_64"] +[tool.cibuildwheel.macos.environment] +MACOSX_DEPLOYMENT_TARGET = "10.12" [build-system] requires = [ diff --git a/setup.cfg b/setup.cfg index 6769b8a..75d85b9 100755 --- a/setup.cfg +++ b/setup.cfg @@ -10,3 +10,6 @@ search = name = "py_cpp_demangle" version = "{current_version}" replace = name = "py_cpp_demangle" version = "{new_version}" + +[bdist_wheel] +py_limited_api=cp38 \ No newline at end of file