Skip to content

Commit a7e0e76

Browse files
committed
convert to scikit-build-core
1 parent 431c03d commit a7e0e76

File tree

14 files changed

+134
-188
lines changed

14 files changed

+134
-188
lines changed

.github/workflows/pythonbuild.yml

Lines changed: 40 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ jobs:
1212
name: Build source distribution
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
submodules: 'true'
18-
- uses: actions/setup-python@v4
18+
19+
- uses: actions/setup-python@v5
1920

2021
- name: Install dependencies
2122
run: |
@@ -44,8 +45,9 @@ jobs:
4445
run: |
4546
tools/seg_wrapper.sh pytest tests
4647
47-
- uses: actions/upload-artifact@v3
48+
- uses: actions/upload-artifact@v4
4849
with:
50+
name: artifact-sdist
4951
path: dist/*.tar.gz
5052

5153
build_wheels_windows:
@@ -56,21 +58,17 @@ jobs:
5658
fail-fast: false
5759
matrix:
5860
arch: [auto32, auto64, ARM64]
59-
python_tag: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp38-*", "pp39-*"]
61+
python_tag: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "pp39-*", "pp310-*"]
6062
exclude:
6163
# PyPy only supports x86_64 on Windows
62-
- arch: auto32
63-
python_tag: "pp38-*"
6464
- arch: auto32
6565
python_tag: "pp39-*"
66-
67-
# ARM64 only supported only supported on cpython >= 3.9
68-
- arch: ARM64
69-
python_tag: "pp38-*"
66+
- arch: auto32
67+
python_tag: "pp310-*"
7068
- arch: ARM64
7169
python_tag: "pp39-*"
7270
- arch: ARM64
73-
python_tag: "cp38-*"
71+
python_tag: "pp310-*"
7472

7573
env:
7674
CIBW_BUILD: ${{matrix.python_tag}}
@@ -80,25 +78,26 @@ jobs:
8078
CIBW_BUILD_VERBOSITY: 3
8179

8280
steps:
83-
- uses: actions/download-artifact@v3
81+
- uses: actions/download-artifact@v4
8482
with:
85-
name: artifact
83+
name: artifact-sdist
8684
path: dist
8785

88-
- uses: actions/setup-python@v4
86+
- uses: actions/setup-python@v5
8987

9088
- name: Copy wheel
9189
run: cp dist/*.tar.gz rapidfuzz.tar.gz
9290

9391
- name: Build wheels
94-
uses: pypa/cibuildwheel@v2.16.5
92+
uses: pypa/cibuildwheel@v2.21.1
9593
with:
9694
package-dir: rapidfuzz.tar.gz
9795
output-dir: wheelhouse
9896

9997
- name: Upload wheels
100-
uses: actions/upload-artifact@v3
98+
uses: actions/upload-artifact@v4
10199
with:
100+
name: artifact-${{ github.job }}-${{ strategy.job-index }}
102101
path: ./wheelhouse/*.whl
103102

104103
build_wheels_macos:
@@ -109,17 +108,7 @@ jobs:
109108
fail-fast: false
110109
matrix:
111110
arch: [x86_64, arm64, universal2]
112-
python_tag: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp38-*", "pp39-*"]
113-
exclude:
114-
# PyPy not supported on MacOS Arm
115-
- arch: arm64
116-
python_tag: "pp38-*"
117-
- arch: arm64
118-
python_tag: "pp39-*"
119-
- arch: universal2
120-
python_tag: "pp38-*"
121-
- arch: universal2
122-
python_tag: "pp39-*"
111+
python_tag: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "pp39-*", "pp310-*"]
123112
env:
124113
CIBW_BUILD: ${{matrix.python_tag}}
125114
CIBW_ARCHS: ${{matrix.arch}}
@@ -129,25 +118,26 @@ jobs:
129118
CIBW_BUILD_VERBOSITY: 3
130119

131120
steps:
132-
- uses: actions/download-artifact@v3
121+
- uses: actions/download-artifact@v4
133122
with:
134-
name: artifact
123+
name: artifact-sdist
135124
path: dist
136125

137-
- uses: actions/setup-python@v4
126+
- uses: actions/setup-python@v5
138127

139128
- name: Copy wheel
140129
run: cp dist/*.tar.gz rapidfuzz.tar.gz
141130

142131
- name: Build wheels
143-
uses: pypa/cibuildwheel@v2.16.5
132+
uses: pypa/cibuildwheel@v2.21.1
144133
with:
145134
package-dir: rapidfuzz.tar.gz
146135
output-dir: wheelhouse
147136

148137
- name: Upload wheels
149-
uses: actions/upload-artifact@v3
138+
uses: actions/upload-artifact@v4
150139
with:
140+
name: artifact-${{ github.job }}-${{ strategy.job-index }}
151141
path: ./wheelhouse/*.whl
152142

153143
build_wheels_linux:
@@ -158,17 +148,17 @@ jobs:
158148
fail-fast: false
159149
matrix:
160150
arch: [auto, aarch64, ppc64le, s390x]
161-
python_tag: ["cp38-*", "cp39-*", "cp310-*", "cp311-*", "cp312-*", "pp38-*", "pp39-*"]
151+
python_tag: ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*", "pp39-*", "pp310-*"]
162152
exclude:
163153
# PyPy builds not supported on ppc64le / s390x
164-
- arch: ppc64le
165-
python_tag: "pp38-*"
166154
- arch: ppc64le
167155
python_tag: "pp39-*"
168-
- arch: s390x
169-
python_tag: "pp38-*"
156+
- arch: ppc64le
157+
python_tag: "pp310-*"
170158
- arch: s390x
171159
python_tag: "pp39-*"
160+
- arch: s390x
161+
python_tag: "pp310-*"
172162
env:
173163
CIBW_ARCHS_LINUX: ${{matrix.arch}}
174164
CIBW_BUILD: ${{matrix.python_tag}}
@@ -178,28 +168,29 @@ jobs:
178168
CIBW_BUILD_VERBOSITY: 3
179169

180170
steps:
181-
- uses: actions/download-artifact@v3
171+
- uses: actions/download-artifact@v4
182172
with:
183-
name: artifact
173+
name: artifact-sdist
184174
path: dist
185175

186-
- uses: actions/setup-python@v4
187-
188-
- uses: docker/setup-qemu-action@v2
189-
name: Set up QEMU
176+
- uses: actions/setup-python@v5
190177

191178
- name: Copy wheel
192179
run: cp dist/*.tar.gz rapidfuzz.tar.gz
193180

181+
- uses: docker/setup-qemu-action@v3
182+
name: Set up QEMU
183+
194184
- name: Build wheel
195-
uses: pypa/cibuildwheel@v2.16.5
185+
uses: pypa/cibuildwheel@v2.21.1
196186
with:
197187
package-dir: rapidfuzz.tar.gz
198188
output-dir: wheelhouse
199189

200190
- name: Upload wheels
201-
uses: actions/upload-artifact@v3
191+
uses: actions/upload-artifact@v4
202192
with:
193+
name: artifact-${{ github.job }}-${{ strategy.job-index }}
203194
path: ./wheelhouse/*.whl
204195

205196
deploy-wheels:
@@ -211,9 +202,10 @@ jobs:
211202
permissions:
212203
id-token: write
213204
steps:
214-
- uses: actions/download-artifact@v3
205+
- uses: actions/download-artifact@v4
215206
with:
216-
name: artifact
217207
path: dist
208+
pattern: artifact-*
209+
merge-multiple: true
218210

219-
- uses: pypa/gh-action-pypi-publish@v1.8.11
211+
- uses: pypa/gh-action-pypi-publish@v1.8.11

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,3 +140,6 @@ cython_debug/
140140
# vscode
141141
.vscode/
142142
_skbuild/
143+
144+
# Cython generated files
145+
*.cxx

.pre-commit-config.yaml

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,15 @@
1212
#
1313
# See https://github.com/pre-commit/pre-commit
1414

15+
exclude: |
16+
(?x)(
17+
.*\.patch
18+
)
19+
1520
repos:
1621
# Standard hooks
1722
- repo: https://github.com/pre-commit/pre-commit-hooks
18-
rev: "v4.5.0"
23+
rev: "v4.6.0"
1924
hooks:
2025
- id: check-added-large-files
2126
- id: check-case-conflict
@@ -32,26 +37,26 @@ repos:
3237

3338
# Black, the code formatter, natively supports pre-commit
3439
- repo: https://github.com/psf/black
35-
rev: "24.1.1" # Keep in sync with blacken-docs
40+
rev: "24.8.0" # Keep in sync with blacken-docs
3641
hooks:
3742
- id: black
3843

3944
# Also code format the docs
4045
- repo: https://github.com/asottile/blacken-docs
41-
rev: "1.16.0"
46+
rev: "1.18.0"
4247
hooks:
4348
- id: blacken-docs
4449
additional_dependencies:
4550
- black==22.8.0 # keep in sync with black hook
4651

4752
# Changes tabs to spaces
4853
- repo: https://github.com/Lucas-C/pre-commit-hooks
49-
rev: "v1.5.4"
54+
rev: "v1.5.5"
5055
hooks:
5156
- id: remove-tabs
5257

5358
- repo: https://github.com/sirosen/texthooks
54-
rev: "0.6.4"
59+
rev: "0.6.7"
5560
hooks:
5661
- id: fix-ligatures
5762
- id: fix-smartquotes
@@ -68,7 +73,7 @@ repos:
6873

6974
# PyLint has native support - not always usable, but works for us
7075
- repo: https://github.com/PyCQA/pylint
71-
rev: "v3.0.3"
76+
rev: "v3.2.7"
7277
hooks:
7378
- id: pylint
7479
files: ^pybind11
@@ -91,24 +96,15 @@ repos:
9196
# exclude: ^(tests|docs)/
9297
# additional_dependencies: [nox, rich]
9398

94-
# Checks the manifest for missing files (native support)
95-
- repo: https://github.com/mgedmin/check-manifest
96-
rev: "0.49"
97-
hooks:
98-
- id: check-manifest
99-
# This is a slow hook, so only run this if --hook-stage manual is passed
100-
stages: [manual]
101-
additional_dependencies: [cmake, ninja]
102-
10399
- repo: https://github.com/charliermarsh/ruff-pre-commit
104-
rev: v0.2.1
100+
rev: v0.6.5
105101
hooks:
106102
- id: ruff
107103
args: ["--fix", "--show-fixes"]
108104

109105
# Check for spelling
110106
- repo: https://github.com/codespell-project/codespell
111-
rev: "v2.2.6"
107+
rev: "v2.3.0"
112108
hooks:
113109
- id: codespell
114110
exclude: ".*/test_.*.py"
@@ -131,7 +127,7 @@ repos:
131127

132128
# Clang format the codebase automatically
133129
- repo: https://github.com/pre-commit/mirrors-clang-format
134-
rev: "v17.0.6"
130+
rev: "v18.1.8"
135131
hooks:
136132
- id: clang-format
137133
types_or: [c++, c]

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.12...3.24)
1+
cmake_minimum_required(VERSION 3.15...3.26)
22

33
cmake_policy(SET CMP0054 NEW)
44
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)

HISTORY.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## Changelog
22

3+
### v0.26.0
4+
#### Changed
5+
- add support for Python 3.13
6+
- switch build system to `scikit-build-core`
7+
38
### v0.25.1
49
#### Fixed
510
- fix potentially incorrect results of `jaro_winkler` when using high prefix weights

MANIFEST.in

Lines changed: 0 additions & 16 deletions
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ computation of:
3333
* string sequence and set similarity
3434

3535
## Requirements
36-
* Python 3.8 or later
36+
* Python 3.9 or later
3737

3838
## Installation
3939
```bash

0 commit comments

Comments
 (0)