-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a5060fe
commit 37c9232
Showing
8 changed files
with
116 additions
and
14 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 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 |
---|---|---|
@@ -0,0 +1,89 @@ | ||
from setuptools import build_meta as _orig | ||
from packaging import version as _version | ||
from packaging.tags import sys_tags as _sys_tags | ||
from skbuild.exceptions import SKBuildError as _SKBuildError | ||
from skbuild.cmaker import get_cmake_version as _get_cmake_version | ||
import subprocess as _subprocess | ||
import platform as _platform | ||
|
||
prepare_metadata_for_build_wheel = _orig.prepare_metadata_for_build_wheel | ||
build_wheel = _orig.build_wheel | ||
build_sdist = _orig.build_sdist | ||
get_requires_for_build_sdist = _orig.get_requires_for_build_sdist | ||
|
||
cmake_wheels = { | ||
"win_amd64", | ||
"win32", | ||
"musllinux_1_1_x86_64", | ||
"musllinux_1_1_s390x", | ||
"musllinux_1_1_ppc64le", | ||
"musllinux_1_1_i686", | ||
"musllinux_1_1_aarch64", | ||
"manylinux_2_17_s390x", | ||
"manylinux_2_17_ppc64le", | ||
"manylinux_2_17_aarch64", | ||
"manylinux_2_17_x86_64", | ||
"manylinux_2_17_i686", | ||
"manylinux_2_5_x86_64", | ||
"manylinux_2_5_i686", | ||
"macosx_10_10_universal2", | ||
} | ||
|
||
ninja_wheels = { | ||
"win_amd64", | ||
"win32.whl", | ||
"musllinux_1_1_x86_64", | ||
"musllinux_1_1_s390x", | ||
"musllinux_1_1_ppc64le", | ||
"musllinux_1_1_i686", | ||
"musllinux_1_1_aarch64", | ||
"manylinux_2_17_s390x", | ||
"manylinux_2_17_ppc64le", | ||
"manylinux_2_17_aarch64", | ||
"manylinux_2_5_x86_64", | ||
"manylinux_2_5_i686", | ||
"macosx_10_9_universal2", | ||
} | ||
|
||
def _cmake_required(): | ||
try: | ||
if _version.parse(_get_cmake_version()) >= _version.parse("3.12"): | ||
print("Using System version of cmake") | ||
return False | ||
except _SKBuildError: | ||
pass | ||
|
||
for tag in _sys_tags(): | ||
if tag.platform in cmake_wheels: | ||
return True | ||
|
||
print("No Cmake wheel available on platform") | ||
return False | ||
|
||
def _ninja_required(): | ||
if _platform.system() == "Windows": | ||
print("Ninja is part of the MSVC installation on Windows") | ||
return False | ||
|
||
try: | ||
_subprocess.check_output(["ninja", '--version']) | ||
print("Using System version of Ninja") | ||
return False | ||
except (OSError, _subprocess.CalledProcessError): | ||
pass | ||
|
||
for tag in _sys_tags(): | ||
if tag.platform in ninja_wheels: | ||
return True | ||
|
||
print("No Ninja wheel available on platform") | ||
return False | ||
|
||
def get_requires_for_build_wheel(self, config_settings=None): | ||
packages = [] | ||
if _cmake_required(): | ||
packages.append('cmake') | ||
if _ninja_required(): | ||
packages.append('ninja') | ||
|
||
return _orig.get_requires_for_build_wheel(config_settings) + packages |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ def show_message(*lines): | |
|
||
setup_args = { | ||
"name": "jarowinkler", | ||
"version": "1.1.2", | ||
"version": "1.2.0", | ||
"url": "https://github.com/maxbachmann/JaroWinkler", | ||
"author": "Max Bachmann", | ||
"author_email": "[email protected]", | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
diff --git a/pyproject.toml b/pyproject.toml | ||
index 6efb23f..cd80bc3 100644 | ||
index 1f4d4d6..1f94979 100644 | ||
--- a/pyproject.toml | ||
+++ b/pyproject.toml | ||
@@ -4,7 +4,6 @@ requires = [ | ||
@@ -2,7 +2,6 @@ | ||
requires = [ | ||
"setuptools>=42", | ||
"scikit-build>=0.13.0", | ||
"cmake; platform_machine not in 'armv7l|armv6l|arm64|aarch64'", | ||
"ninja; platform_system!='Windows' and platform_machine not in 'armv7l|armv6l|arm64|aarch64'", | ||
- "Cython==3.0.0a10", | ||
"rapidfuzz_capi==1.0.5" | ||
] | ||
build-backend = "setuptools.build_meta" | ||
build-backend = "backend" |