Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
9 changes: 5 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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__
Expand Down