Skip to content

Commit 70df320

Browse files
committed
generate import handling
1 parent dbfb7ce commit 70df320

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

51 files changed

+1797
-336
lines changed

.clang-format

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,4 @@ BraceWrapping:
2626
AllowAllConstructorInitializersOnNextLine: true
2727
ConstructorInitializerAllOnOneLineOrOnePerLine: true
2828
AllowShortCaseLabelsOnASingleLine: true
29+
SortIncludes: false

.github/workflows/branchbuild.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
2828
- name: Generate cython
2929
run: |
30-
chmod +x ./src/rapidfuzz/generate.sh
31-
./src/rapidfuzz/generate.sh
30+
chmod +x ./tools/generate_cython.sh
31+
./tools/generate_cython.sh
3232
3333
- name: build
3434
run: |
@@ -60,7 +60,7 @@ jobs:
6060
run: |
6161
git clone https://github.com/rapidfuzz/rapidfuzz-cpp.git
6262
cd rapidfuzz-cpp
63-
git checkout v3.1.1
63+
git checkout v3.2.0
6464
mkdir build && cd build
6565
cmake .. -DCMAKE_BUILD_TYPE=Release
6666
cmake --build .
@@ -104,7 +104,7 @@ jobs:
104104
run: |
105105
git clone https://github.com/rapidfuzz/rapidfuzz-cpp.git
106106
cd rapidfuzz-cpp
107-
git checkout v3.1.1
107+
git checkout v3.2.0
108108
mkdir build && cd build
109109
cmake .. -DCMAKE_BUILD_TYPE=Release
110110
cmake --build .
@@ -180,6 +180,15 @@ jobs:
180180
run: |
181181
python -m PyInstaller.utils.run_tests --include_only rapidfuzz.
182182
183+
- name: test cx_freeze packaging
184+
if: matrix.python-version != '3.13'
185+
run: |
186+
pip install cx_freeze
187+
cd tests/freezeTools
188+
cxfreeze --script script.py --target-dir cxfreezeDist
189+
./cxFreezeDist
190+
191+
183192
# validate sse2 code on gcc
184193
sde_tests:
185194
name: "Test sse2 code on Linux (gcc)"
@@ -205,7 +214,7 @@ jobs:
205214
- name: Install testing dependencies
206215
run: |
207216
python -m pip install --upgrade pip
208-
pip install pytest hypothesis pandas mypy pyinstaller[hook_testing]
217+
pip install pytest hypothesis pandas mypy
209218
210219
- name: Test on nehalem which does not support avx2
211220
run: ./sde/sde -nhm -- pytest tests

.github/workflows/coverage.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ jobs:
2424
2525
- name: Generate cython
2626
run: |
27-
chmod +x ./src/rapidfuzz/generate.sh
28-
./src/rapidfuzz/generate.sh
27+
chmod +x ./tools/generate_cython.sh
28+
./tools/generate_cython.sh
2929
3030
# for cython tests inplace installation is required
3131
- name: build

.github/workflows/releasebuild.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ jobs:
2727
# The cythonized files allow installation from the sdist without cython
2828
- name: Generate cython
2929
run: |
30-
chmod +x ./src/rapidfuzz/generate.sh
31-
./src/rapidfuzz/generate.sh
30+
chmod +x ./tools/generate_cython.sh
31+
./tools/generate_cython.sh
3232
3333
- name: Build sdist
3434
run: |

.pre-commit-config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@
1212
#
1313
# See https://github.com/pre-commit/pre-commit
1414

15+
exclude: |
16+
(?x)(
17+
tools/sdist.patch
18+
)
19+
1520
repos:
1621
# Standard hooks
1722
- repo: https://github.com/pre-commit/pre-commit-hooks

CHANGELOG.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Added
2727
Fixed
2828
~~~~~
2929
- drop support for Python 3.8
30-
- switch build system to `scikit-build-core`
30+
- switch build system to ``scikit-build-core``
3131

3232
[3.9.7] - 2024-09-02
3333
^^^^^^^^^^^^^^^^^^^^
@@ -47,7 +47,7 @@ Changed
4747
Fixed
4848
~~~~~
4949
* include simd binaries in pyinstaller builds
50-
* fix builds with setuptools 72 by upgrading `scikit-build`
50+
* fix builds with setuptools 72 by upgrading ``scikit-build``
5151

5252
[3.9.4] - 2024-07-02
5353
^^^^^^^^^^^^^^^^^^^^

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ endif()
3030
if(MSVC)
3131
add_compile_options(/W4 /bigobj /wd4127)
3232

33-
# NOTE: _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR is temporary. When building on
34-
# VS 2022 17.10 or newer, but using an older runtime, mutexes can crash
33+
# NOTE: _DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR is temporary. When building on VS
34+
# 2022 17.10 or newer, but using an older runtime, mutexes can crash
3535
add_compile_options(/D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR)
3636
else()
3737
add_compile_options(-Wall -Wextra -pedantic -Wno-psabi)

pyproject.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ wheel.exclude = [
5454
"**.cpp",
5555
"**.hpp",
5656
"**.h",
57-
"CMakeLists.txt",
58-
"generate.sh"
57+
"CMakeLists.txt"
5958
]
6059
wheel.packages = ["src/rapidfuzz"]
6160
wheel.cmake = false
@@ -162,7 +161,6 @@ select = [
162161
extend-ignore = [
163162
"PLR", # Design related pylint codes
164163
"E501", # Line too long
165-
"PT004", # Use underscore for non-returning fixture (use usefixture instead)
166164
"PTH123", # use pathlib instead of builtin open
167165
]
168166
unfixable = [
@@ -171,6 +169,7 @@ unfixable = [
171169
]
172170
flake8-unused-arguments.ignore-variadic-names = true
173171
isort.required-imports = ["from __future__ import annotations"]
172+
isort.combine-as-imports = true
174173

175174
[tool.ruff.lint.per-file-ignores]
176175
"tests/**" = ["T20"]

src/rapidfuzz/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ function(create_cython_target _name)
1010
VERBATIM
1111
COMMAND
1212
Python::Interpreter -m cython "${CMAKE_CURRENT_LIST_DIR}/${_name}.pyx"
13-
--cplus -I "${CMAKE_CURRENT_LIST_DIR}"
14-
--output-file "${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx")
13+
--cplus -I "${CMAKE_CURRENT_LIST_DIR}" --output-file
14+
"${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx")
1515

1616
set(${_name}
1717
${CMAKE_CURRENT_BINARY_DIR}/${_name}.cxx

src/rapidfuzz/__init__.pyi

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ __author__: str
44
__license__: str
55
__version__: str
66

7-
from rapidfuzz import distance as distance
8-
from rapidfuzz import fuzz as fuzz
9-
from rapidfuzz import process as process
10-
from rapidfuzz import utils as utils
7+
from rapidfuzz import (
8+
distance as distance,
9+
fuzz as fuzz,
10+
process as process,
11+
utils as utils,
12+
)

0 commit comments

Comments
 (0)