Skip to content

Commit

Permalink
Merge branch 'master' into built_in_isascii
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco authored Nov 30, 2024
2 parents ae4b8af + cde3d47 commit 342e094
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 65 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
28 changes: 7 additions & 21 deletions .github/workflows/release-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,34 +12,20 @@ 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@v4
name: Install Python
with:
python-version: '3.8'
- name: Build sdist
run: python setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
uses: ./.github/workflows/run-sdist.yml

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'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4.1.7
- uses: actions/download-artifact@v4
with:
name: artifact
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
merge-multiple: true
- run: ls -lR dist
- name: Upload to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
49 changes: 17 additions & 32 deletions .github/workflows/run-cibuildwheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,46 +20,31 @@ jobs:
fail-fast: ${{ inputs.fail-fast }}
matrix:
include:
- name: Windows AMD64 & x86
os: windows-2019
- name: macOS x86_64 & universal2
os: macos-11
- 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: Windows
os: windows-latest
- name: macOS x86_64
os: macos-13
- 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.16.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
24 changes: 24 additions & 0 deletions .github/workflows/run-sdist.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 4 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,16 @@ 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-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
Expand Down
2 changes: 1 addition & 1 deletion PYPIREADME.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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_*
Expand All @@ -22,6 +22,3 @@ if command -v yum; then
yum install -y libffi-devel
fi
"""

[tool.cibuildwheel.macos]
archs = ["x86_64", "universal2"]
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
Expand Down
2 changes: 1 addition & 1 deletion src/pycares/_version.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

__version__ = '4.4.0'
__version__ = '4.5.0'

0 comments on commit 342e094

Please sign in to comment.