Skip to content

Commit

Permalink
upgrade cython
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann authored Mar 30, 2023
1 parent 1ca8def commit dfea552
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branchbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install numpy rapidfuzz_capi Cython==3.0.0a11
pip install numpy rapidfuzz_capi Cython==3.0.0b2
- name: Generate cython
run: |
Expand Down
16 changes: 14 additions & 2 deletions .github/workflows/releasebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest hypothesis pandas mypy rapidfuzz_capi Cython==3.0.0a11
pip install pytest hypothesis pandas mypy rapidfuzz_capi Cython==3.0.0b2
# The cythonized files allow installation from the sdist without cython
- name: Generate cython
Expand Down Expand Up @@ -59,7 +59,7 @@ jobs:
strategy:
fail-fast: false
matrix:
arch: [auto32, auto64]
arch: [auto32, auto64, ARM64]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"]
exclude:
# PyPy only supports x86_64 on Windows
Expand All @@ -69,6 +69,18 @@ jobs:
python_tag: "pp38-*"
- arch: auto32
python_tag: "pp39-*"

# ARM64 only supported only supported on cpython >= 3.9

This comment has been minimized.

Copy link
@ddelange

ddelange Aug 10, 2023

moin @maxbachmann 👋

loving how many wheels you're pumping out for rapidfuzz!

I just want to give you a heads up that cibuildwheel in recent versions added a feature that lets you forget about all this stuff, and still maximize parallelism of the github actions.

it reads python_requires from the project and will generate all the supported combos automatically 💥 or a subset of them if you pass --arch, etc

I implemented it for asyncpg and for vaex:

vaexio/vaex#2331

in that one I also bump to latest manylinux docker image, see PR description. pretty harmless and might get you some nice speedups from GCC 12

hope that's helpful!

This comment has been minimized.

Copy link
@maxbachmann

maxbachmann Aug 10, 2023

Author Member

Sounds cool. In terms of build time the biggest issue right now are targets requiring emulation under qemu.

One thing I still want to evaluate are builds using the minimal C-API. Currently my releases are over 200mb in size. Using the minimal C-API would significantly reduce this. I expect this should not have a big impact on performance, but this would need to be evaluated.

This comment has been minimized.

Copy link
@ddelange

ddelange Aug 10, 2023

do you mean ABI3 wheels like in giampaolo/psutil#2102?

im afraid it will always result in a performance trade off, not ideal for such a performance oriented library. why make the effort? whats wrong with a 200MB release? there are many much bigger ones, they simply request a project size increase at PyPI like pypa/packaging-problems#109

- arch: ARM64
python_tag: "pp37-*"
- arch: ARM64
python_tag: "pp38-*"
- arch: ARM64
python_tag: "pp39-*"
- arch: ARM64
python_tag: "cp37-*"
- arch: ARM64
python_tag: "cp38-*"
env:
CIBW_BUILD: ${{matrix.python_tag}}
CIBW_ARCHS: ${{matrix.arch}}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
requires = [
"setuptools>=42",
"scikit-build~=0.16.2",
"Cython==3.0.0a11"
"Cython==3.0.0b2"
]
build-backend = "backend"
backend-path = ["_custom_build"]
Expand Down
2 changes: 1 addition & 1 deletion tools/sdist.patch
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ index 77671b1..7692f90 100644
requires = [
"setuptools>=42",
- "scikit-build~=0.16.2",
- "Cython==3.0.0a11"
- "Cython==3.0.0b2"
+ "scikit-build~=0.16.2"
]
build-backend = "backend"
Expand Down

0 comments on commit dfea552

Please sign in to comment.