Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to scikit-build-core #397

Merged
merged 19 commits into from
Sep 21, 2024
Merged
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/branchbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ jobs:
submodules: 'true'
- uses: "actions/setup-python@v5"
with:
allow-prereleases: true
python-version: "${{ matrix.python-version }}"

- name: build
Expand Down
15 changes: 8 additions & 7 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
Changelog
---------

[3.10.0] - 2024-09-21
^^^^^^^^^^^^^^^^^^^^^
Fixed
~~~~~
- drop support for Python 3.8
- switch build system to `scikit-build-core`

[3.9.7] - 2024-09-02
^^^^^^^^^^^^^^^^^^^^
Fixed
~~~~~~~
~~~~~
* fix crash in ``cdist`` due to Visual Studio upgrade


[3.9.6] - 2024-08-06
^^^^^^^^^^^^^^^^^^^^
Changed
Expand Down Expand Up @@ -41,14 +47,12 @@ Fixed
~~~~~
* fix supported versions of taskflow in cmake to be in the range v3.3 - v3.7


[3.9.1] - 2024-05-19
^^^^^^^^^^^^^^^^^^^^
Fixed
~~~~~
* disable AVX2 on MacOS since it did lead to illegal instructions being generated


[3.9.0] - 2024-05-02
^^^^^^^^^^^^^^^^^^^^
Changed
Expand All @@ -59,14 +63,12 @@ Fixed
~~~~~
* fix cmake version parsing


[3.8.1] - 2024-04-07
^^^^^^^^^^^^^^^^^^^^
Fixed
~~~~~
* use the correct version of ``rapidfuzz-cpp`` when building against a system installed version


[3.8.0] - 2024-04-06
^^^^^^^^^^^^^^^^^^^^
Added
Expand All @@ -78,7 +80,6 @@ Fixed
- fix some minor errors in the type hints
- fix potentially incorrect results of JaroWinkler when using high prefix weights


[3.7.0] - 2024-03-21
^^^^^^^^^^^^^^^^^^^^
Changed
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12...3.29)
cmake_minimum_required(VERSION 3.15...3.30)

set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
Expand Down
30 changes: 0 additions & 30 deletions MANIFEST.in

This file was deleted.

98 changes: 0 additions & 98 deletions _custom_build/backend.py

This file was deleted.

91 changes: 87 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,94 @@
[build-system]
requires = [
"setuptools>=42",
"scikit-build~=0.18.0",
"scikit-build-core>=0.10.7",
"Cython >=3.0.11, <3.1.0"
]
build-backend = "backend"
backend-path = ["_custom_build"]
build-backend = "scikit_build_core.build"

[project]
name = "RapidFuzz"
dynamic = ["version"]
requires-python = ">= 3.9"
authors = [
{name = "Max Bachmann", email = "[email protected]"},
]
description = "rapid fuzzy string matching"
readme = "README.md"
classifiers=[
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
maxbachmann marked this conversation as resolved.
Show resolved Hide resolved
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: MIT License",
]
Homepage = "https://github.com/rapidfuzz/RapidFuzz"
Documentation = "https://rapidfuzz.github.io/RapidFuzz/"
Repository = "https://github.com/rapidfuzz/RapidFuzz.git"
Issues = "https://github.com/rapidfuzz/RapidFuzz/issues"
Changelog = "https://github.com/rapidfuzz/RapidFuzz/blob/main/CHANGELOG.rst"

[project.optional-dependencies]
all = [
"numpy"
]

[project.entry-points.pyinstaller40]
hook-dirs = "rapidfuzz.__pyinstaller:get_hook_dirs"
tests = "rapidfuzz.__pyinstaller:get_PyInstaller_tests"

[tool.scikit-build]
maxbachmann marked this conversation as resolved.
Show resolved Hide resolved
minimum-version = "build-system.requires"
sdist.include = [
"src/rapidfuzz/*.cxx",
maxbachmann marked this conversation as resolved.
Show resolved Hide resolved
"src/rapidfuzz/distance/*.cxx",
]
sdist.exclude = [
".github"
]
wheel.exclude = [
"**.pyx",
"**.cxx",
"**.pxd",
"**.cpp",
"**.hpp",
"**.h",
"CMakeLists.txt",
"generate.sh"
]
wheel.packages = ["src/rapidfuzz"]
wheel.cmake = false
messages.after-success = "{yellow}Cmake unavailable, falling back to pure Python Extension"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
messages.after-success = "{yellow}Cmake unavailable, falling back to pure Python Extension"
messages.after-success = "{yellow}CMake unavailable, falling back to pure Python Extension"

Unnecessary stylistic nitpick. ;)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)


[[tool.scikit-build.overrides]]
if.any.system-cmake = ">=3.15"
if.any.cmake-wheel = true
wheel.cmake = true
messages.after-success = "{green}C++ Extension built successfully"

[[tool.scikit-build.overrides]]
if.failed = true
if.env.CIBUILDWHEEL = false
if.env.CONDA_BUILD = false
if.env.PIWHEELS_BUILD = false
if.env.RAPIDFUZZ_BUILD_EXTENSION = false
wheel.cmake = false
messages.after-success = "{yellow}Failed to build C++ Extension, falling back to pure Python Extension"

[[tool.scikit-build.overrides]]
if.any.env.CIBUILDWHEEL = true
if.any.env.CONDA_BUILD = true
if.any.env.PIWHEELS_BUILD = true
if.any.env.RAPIDFUZZ_BUILD_EXTENSION = true
wheel.cmake = true
messages.after-success = "{green}C++ Extension built successfully"
messages.after-failure = "{red}Failed to build C++ Extension in a packaged build"

[tool.scikit-build.metadata.version]
provider = "scikit_build_core.metadata.regex"
input = "src/rapidfuzz/__init__.py"


[tool.black]
line-length = 120
Expand Down
87 changes: 0 additions & 87 deletions setup.py

This file was deleted.

Loading