Skip to content

Commit

Permalink
add python 3.12 support
Browse files Browse the repository at this point in the history
  • Loading branch information
maxbachmann committed Oct 6, 2023
1 parent 4fc08a5 commit ef7466e
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 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.0b2
pip install numpy rapidfuzz_capi Cython==3.0.3
- name: Generate cython
run: |
Expand Down
14 changes: 7 additions & 7 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.0b2
pip install pytest hypothesis pandas mypy rapidfuzz_capi Cython==3.0.3
# The cythonized files allow installation from the sdist without cython
- name: Generate cython
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:
fail-fast: false
matrix:
arch: [auto32, auto64, ARM64]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp37-*", "pp38-*", "pp39-*"]
exclude:
# PyPy only supports x86_64 on Windows
- arch: auto32
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
- uses: actions/setup-python@v4

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.1
uses: pypa/cibuildwheel@v2.15.0
with:
package-dir: rapidfuzz.tar.gz
output-dir: wheelhouse
Expand All @@ -119,7 +119,7 @@ jobs:
fail-fast: false
matrix:
arch: [x86_64, arm64, universal2]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp37-*", "pp38-*", "pp39-*"]
exclude:
# MacOS Arm only supported since Python 3.8
- arch: arm64
Expand Down Expand Up @@ -160,7 +160,7 @@ jobs:
run: cp dist/*.tar.gz rapidfuzz.tar.gz

- name: Build wheels
uses: pypa/cibuildwheel@v2.12.1
uses: pypa/cibuildwheel@v2.15.0
with:
package-dir: rapidfuzz.tar.gz
output-dir: wheelhouse
Expand All @@ -178,7 +178,7 @@ jobs:
fail-fast: false
matrix:
arch: [auto, aarch64, ppc64le, s390x]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "pp37-*", "pp38-*", "pp39-*"]
python_tag: ["cp37-*", "cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp37-*", "pp38-*", "pp39-*"]
exclude:
# PyPy builds not available for these platforms
- arch: ppc64le
Expand Down Expand Up @@ -217,7 +217,7 @@ jobs:
name: Set up QEMU

- name: Build wheel
uses: pypa/cibuildwheel@v2.12.1
uses: pypa/cibuildwheel@v2.15.0
with:
package-dir: rapidfuzz.tar.gz
output-dir: wheelhouse
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.17.0",
"Cython==3.0.0b2"
"Cython==3.0.3"
]
build-backend = "backend"
backend-path = ["_custom_build"]
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ def show_message(*lines):
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"License :: OSI Approved :: MIT License",
],
"packages": ["rapidfuzz", "rapidfuzz.distance", "rapidfuzz.__pyinstaller"],
Expand Down
2 changes: 1 addition & 1 deletion src/rapidfuzz/distance/metrics_cpp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ def levenshtein_opcodes(s1, s2, *, processor=None, score_hint=None):
ops.editops = levenshtein_editops_func(s1_proc.string, s2_proc.string, c_score_hint)
return ops.as_opcodes()

cdef void KwargsDeinit(RF_Kwargs* self):
cdef void KwargsDeinit(RF_Kwargs* self) noexcept:
free(<void*>self.context)

cdef bool LevenshteinKwargsInit(RF_Kwargs* self, dict kwargs) except False:
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.17.0",
- "Cython==3.0.0b2"
- "Cython==3.0.3"
+ "scikit-build~=0.17.0"
]
build-backend = "backend"
Expand Down

0 comments on commit ef7466e

Please sign in to comment.