From da178fd6c84c296f2a06439021cfcdcec0b93e58 Mon Sep 17 00:00:00 2001 From: ChrisJL Date: Fri, 8 Nov 2024 05:48:46 +0000 Subject: [PATCH 1/6] Add 3.13 support, remove 3.8 (#202) --- .github/workflows/run-cibuildwheel.yml | 6 ++++-- .github/workflows/test.yml | 4 ++-- PYPIREADME.rst | 2 +- README.rst | 2 +- setup.py | 4 ++-- 5 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-cibuildwheel.yml b/.github/workflows/run-cibuildwheel.yml index 77040be..0075dab 100644 --- a/.github/workflows/run-cibuildwheel.yml +++ b/.github/workflows/run-cibuildwheel.yml @@ -23,7 +23,9 @@ jobs: - name: Windows AMD64 & x86 os: windows-2019 - name: macOS x86_64 & universal2 - os: macos-11 + os: macos-13 + - name: macOS M1 + os: macos-15 - name: manylinux and musllinux x86_64 & i686 os: ubuntu-20.04 cibw_build: cp3*-{manylinux,musllinux}_* @@ -55,7 +57,7 @@ jobs: run: echo "CIBW_ARCHS=${{ matrix.cibw_archs }}" >> $GITHUB_ENV shell: bash - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.21.2 with: output-dir: ./wheelhouse env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index baab2bc..657bcc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,8 +9,8 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-11] - python-version: ['3.8', '3.9', '3.10', '3.11', '3.12'] + os: [ubuntu-20.04, windows-2019, macos-13, macos-15] + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: diff --git a/PYPIREADME.rst b/PYPIREADME.rst index ae4d83c..5a62435 100644 --- a/PYPIREADME.rst +++ b/PYPIREADME.rst @@ -109,7 +109,7 @@ Unless stated otherwise on-file pycares uses the MIT license, check LICENSE file Supported Python versions ------------------------- -Python >= 3.8 are supported. Both CPython and PyPy are supported. +Python >= 3.9 are supported. Both CPython and PyPy are supported. Contributing diff --git a/README.rst b/README.rst index e2e1b97..714d83e 100644 --- a/README.rst +++ b/README.rst @@ -115,7 +115,7 @@ Unless stated otherwise on-file pycares uses the MIT license, check LICENSE file Supported Python versions ------------------------- -Python >= 3.8 are supported. Both CPython and PyPy are supported. +Python >= 3.9 are supported. Both CPython and PyPy are supported. Contributing diff --git a/setup.py b/setup.py index df67ae7..59a89e9 100755 --- a/setup.py +++ b/setup.py @@ -36,18 +36,18 @@ def get_version(): 'Operating System :: Microsoft :: Windows', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', + 'Programming Language :: Python :: 3.13', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', ], cmdclass = {'build_ext': cares_build_ext}, install_requires = ['cffi>=1.5.0'], extras_require = {'idna': ['idna >= 2.1']}, - python_requires = '>=3.8', + python_requires = '>=3.9', cffi_modules = ['src/_cffi_src/build_cares.py:ffi'], package_dir = {'': 'src'}, packages = ['pycares'], From 70443e0446304e98c8cadaefa98d0d9b0286be54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Sat, 23 Nov 2024 09:41:14 +0100 Subject: [PATCH 2/6] Bump version to 4.5.0 --- src/pycares/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pycares/_version.py b/src/pycares/_version.py index 23bef39..87ab045 100644 --- a/src/pycares/_version.py +++ b/src/pycares/_version.py @@ -1,2 +1,2 @@ -__version__ = '4.4.0' +__version__ = '4.5.0' From 1a197b256020d14ee63102406aead7b68c117ef9 Mon Sep 17 00:00:00 2001 From: monosans Date: Mon, 25 Nov 2024 12:27:34 +0000 Subject: [PATCH 3/6] chore(ci): fix upload & add more platforms to cibuildwheel (#204) --- .github/workflows/release-wheels.yml | 14 ++++---- .github/workflows/run-cibuildwheel.yml | 49 +++++++++----------------- .github/workflows/test.yml | 5 +-- pyproject.toml | 5 +-- 4 files changed, 26 insertions(+), 47 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 7d45b4d..3740de1 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -18,14 +18,16 @@ jobs: - uses: actions/checkout@v4 with: submodules: true - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 name: Install Python with: - python-version: '3.8' + check-latest: true + python-version: '3.13' - name: Build sdist run: python setup.py sdist - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: + name: sdist path: dist/*.tar.gz upload_pypi: @@ -34,11 +36,7 @@ jobs: # upload to PyPI when a GitHub Release is created if: github.event_name == 'release' && github.event.action == 'published' steps: - - uses: actions/download-artifact@v4.1.7 - with: - name: artifact - path: dist - + - uses: actions/download-artifact@v4 - uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/run-cibuildwheel.yml b/.github/workflows/run-cibuildwheel.yml index 0075dab..c267a56 100644 --- a/.github/workflows/run-cibuildwheel.yml +++ b/.github/workflows/run-cibuildwheel.yml @@ -20,48 +20,31 @@ jobs: fail-fast: ${{ inputs.fail-fast }} matrix: include: - - name: Windows AMD64 & x86 - os: windows-2019 - - name: macOS x86_64 & universal2 + - name: Windows + os: windows-latest + - name: macOS x86_64 os: macos-13 - - name: macOS M1 - os: macos-15 - - name: manylinux and musllinux x86_64 & i686 - os: ubuntu-20.04 - cibw_build: cp3*-{manylinux,musllinux}_* - cibw_archs: auto - - name: manylinux aarch64 - os: ubuntu-20.04 - cibw_build: cp3*-manylinux_* - cibw_archs: aarch64 - - name: musllinux aarch64 - os: ubuntu-20.04 - cibw_build: cp3*-musllinux_* - cibw_archs: aarch64 - + - name: macOS arm64 + os: macos-latest + - name: Linux + os: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: true - name: Set up QEMU - if: runner.os == 'Linux' && matrix.cibw_archs == 'aarch64' + if: runner.os == 'Linux' uses: docker/setup-qemu-action@v3 with: platforms: all - - name: Set CIBW_BUILD - if: ${{ matrix.cibw_build }} - run: echo "CIBW_BUILD=${{ matrix.cibw_build }}" >> $GITHUB_ENV - shell: bash - - name: Set CIBW_ARCHS - if: ${{ matrix.cibw_archs }} - run: echo "CIBW_ARCHS=${{ matrix.cibw_archs }}" >> $GITHUB_ENV - shell: bash + - name: Enable CPython prerelease + if: ${{ inputs.prerelease-pythons }} + run: echo "CIBW_ENABLE=cpython-prerelease" >> $GITHUB_ENV - name: Build wheels - uses: pypa/cibuildwheel@v2.21.2 + uses: pypa/cibuildwheel@v2.22.0 with: - output-dir: ./wheelhouse - env: - CIBW_PRERELEASE_PYTHONS: ${{ inputs.prerelease-pythons }} - - uses: actions/upload-artifact@v3 + output-dir: dist + - uses: actions/upload-artifact@v4 with: - path: ./wheelhouse/*.whl + name: wheels-${{ matrix.os }} + path: dist/*.whl diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 657bcc6..d939a18 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,15 +9,16 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-20.04, windows-2019, macos-13, macos-15] + os: [ubuntu-latest, windows-latest, macos-13, macos-latest] python-version: ['3.9', '3.10', '3.11', '3.12', '3.13'] steps: - uses: actions/checkout@v4 with: submodules: true - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: + check-latest: true python-version: ${{ matrix.python-version }} - name: Install dependencies run: python -m pip install -U setuptools wheel diff --git a/pyproject.toml b/pyproject.toml index a0d0af7..48a3958 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta" build = "cp3*" [tool.cibuildwheel.linux] -archs = ["auto", "aarch64"] +archs = ["auto", "aarch64", "ppc64le", "s390x"] before-all = """ set -eux # musllinux_* @@ -22,6 +22,3 @@ if command -v yum; then yum install -y libffi-devel fi """ - -[tool.cibuildwheel.macos] -archs = ["x86_64", "universal2"] From f770a07b24f9cc1c9af9579d0c8e8484fbddbef1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 25 Nov 2024 21:27:11 +0100 Subject: [PATCH 4/6] Test building release wheels on PRs --- .github/workflows/release-wheels.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 3740de1..34a23bb 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -1,6 +1,7 @@ name: Release Wheels on: + pull_request: release: types: - published @@ -33,11 +34,12 @@ jobs: upload_pypi: needs: [build_wheels, build_sdist] runs-on: ubuntu-latest - # upload to PyPI when a GitHub Release is created - if: github.event_name == 'release' && github.event.action == 'published' steps: - uses: actions/download-artifact@v4 - - uses: pypa/gh-action-pypi-publish@release/v1 + - run: ls -lR dist + - name: Upload to PyPI + if: github.event_name == 'release' && github.event.action == 'published' + uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ password: ${{ secrets.pypi_password }} From 6885e0e428c7119d4539ba7ff9ef73ef4a858d9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 25 Nov 2024 21:35:53 +0100 Subject: [PATCH 5/6] Fix building sdist --- .github/workflows/release-wheels.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 34a23bb..9cedb43 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -24,6 +24,8 @@ jobs: with: check-latest: true python-version: '3.13' + - name: Install setuptools + run: python -m pip install -U setuptools - name: Build sdist run: python setup.py sdist - uses: actions/upload-artifact@v4 From cde3d471035a2e867b85ef64f80eed727a93d4c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Mon, 25 Nov 2024 23:15:28 +0100 Subject: [PATCH 6/6] Fixup CI - Share sdist action - Fix gathering uploaded artifacts --- .github/workflows/build-wheels.yml | 13 +++++++++++++ .github/workflows/release-wheels.yml | 26 +++++--------------------- .github/workflows/run-sdist.yml | 24 ++++++++++++++++++++++++ 3 files changed, 42 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/run-sdist.yml diff --git a/.github/workflows/build-wheels.yml b/.github/workflows/build-wheels.yml index a621017..047b493 100644 --- a/.github/workflows/build-wheels.yml +++ b/.github/workflows/build-wheels.yml @@ -7,3 +7,16 @@ jobs: uses: ./.github/workflows/run-cibuildwheel.yml with: prerelease-pythons: true + + build_sdist: + uses: ./.github/workflows/run-sdist.yml + + check_build: + needs: [build_wheels, build_sdist] + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true + - run: ls -lR dist diff --git a/.github/workflows/release-wheels.yml b/.github/workflows/release-wheels.yml index 9cedb43..b65c6f9 100644 --- a/.github/workflows/release-wheels.yml +++ b/.github/workflows/release-wheels.yml @@ -1,7 +1,6 @@ name: Release Wheels on: - pull_request: release: types: - published @@ -13,34 +12,19 @@ jobs: fail-fast: true build_sdist: - name: Build source distribution - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: true - - uses: actions/setup-python@v5 - name: Install Python - with: - check-latest: true - python-version: '3.13' - - name: Install setuptools - run: python -m pip install -U setuptools - - name: Build sdist - run: python setup.py sdist - - uses: actions/upload-artifact@v4 - with: - name: sdist - path: dist/*.tar.gz + uses: ./.github/workflows/run-sdist.yml upload_pypi: needs: [build_wheels, build_sdist] + if: github.event_name == 'release' && github.event.action == 'published' runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 + with: + path: dist + merge-multiple: true - run: ls -lR dist - name: Upload to PyPI - if: github.event_name == 'release' && github.event.action == 'published' uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/run-sdist.yml b/.github/workflows/run-sdist.yml new file mode 100644 index 0000000..eab5277 --- /dev/null +++ b/.github/workflows/run-sdist.yml @@ -0,0 +1,24 @@ +on: + workflow_call: + +jobs: + build_sdist: + name: Build source distribution + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - uses: actions/setup-python@v5 + name: Install Python + with: + check-latest: true + python-version: '3.13' + - name: Install setuptools + run: python -m pip install -U setuptools + - name: Build sdist + run: python setup.py sdist + - uses: actions/upload-artifact@v4 + with: + name: sdist + path: dist/*.tar.gz