-
-
Notifications
You must be signed in to change notification settings - Fork 120
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port build system to scikit-build-core (#397)
- Loading branch information
1 parent
d8238f5
commit 2e85e5f
Showing
11 changed files
with
134 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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", | ||
"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] | ||
minimum-version = "build-system.requires" | ||
sdist.include = [ | ||
"src/rapidfuzz/*.cxx", | ||
"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" | ||
|
||
[[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 | ||
|
Oops, something went wrong.