diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 353ed824..3cae6b46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -91,6 +91,7 @@ jobs: cibuildwheel --print-build-identifiers --platform linux --archs x86_64,aarch64 | grep cp | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ && cibuildwheel --print-build-identifiers --platform macos --archs x86_64,arm64 | grep cp | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ && cibuildwheel --print-build-identifiers --platform windows --archs x86,AMD64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-latest"}' + && cibuildwheel --print-build-identifiers --platform windows --archs ARM64 | grep cp | jq -nRc '{"only": inputs, "os": "windows-11-arm"}' } | jq -sc ) echo "include=$MATRIX_INCLUDE" >> $GITHUB_OUTPUT diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 77e63738..36841181 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,12 +18,14 @@ jobs: strategy: matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14", "3.14t"] - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest, windows-11-arm] loop: [asyncio, uvloop] exclude: # uvloop does not support windows - loop: uvloop os: windows-latest + - loop: uvloop + os: windows-11-arm runs-on: ${{ matrix.os }} diff --git a/pyproject.toml b/pyproject.toml index e2b18388..c958f9ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,8 @@ docs = [ [build-system] requires = [ "setuptools>=77.0.3", - "Cython(>=3.2.1,<4.0.0)" + "Cython(>=3.2.1,<4.0.0)", + "packaging>=24.0" ] build-backend = "setuptools.build_meta" diff --git a/setup.py b/setup.py index f9fafadf..aad10a21 100644 --- a/setup.py +++ b/setup.py @@ -188,8 +188,6 @@ def finalize_options(self): need_cythonize = True if need_cythonize: - import pkg_resources - # Double check Cython presence in case setup_requires # didn't go into effect (most likely because someone # imported Cython before setup_requires injected the @@ -201,8 +199,11 @@ def finalize_options(self): 'please install {} to compile asyncpg from source'.format( CYTHON_DEPENDENCY)) - cython_dep = pkg_resources.Requirement.parse(CYTHON_DEPENDENCY) - if Cython.__version__ not in cython_dep: + from packaging.requirements import Requirement + + cython_dep = Requirement(CYTHON_DEPENDENCY) + if not cython_dep.specifier.contains( + Cython.__version__, prereleases=True): raise RuntimeError( 'asyncpg requires {}, got Cython=={}'.format( CYTHON_DEPENDENCY, Cython.__version__