release v2.10.2

This commit is contained in:
Max Bachmann 2022-09-27 20:50:58 +02:00 committed by GitHub
parent 455e08c2cc
commit 7481ffe886
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 45 additions and 9 deletions

View File

@ -1,5 +1,9 @@
## Changelog
### [2.10.2] - 2022-08-27
#### Fixed
- fix support for cmake versions below 3.17
### [2.10.1] - 2022-09-25
#### Changed
- modernize cmake build to fix most conda-forge builds

View File

@ -19,7 +19,14 @@ else()
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
endif()
if("${Python_INTERPRETER_ID}" STREQUAL "PyPy")
if(CMAKE_VERSION VERSION_LESS 3.17)
execute_process(
COMMAND "${Python_EXECUTABLE}" -c
"import sysconfig; print(sysconfig.get_config_var('EXT_SUFFIX').split('.')[1])"
OUTPUT_VARIABLE Python_SOABI
OUTPUT_STRIP_TRAILING_WHITESPACE COMMAND_ECHO STDOUT)
message(STATUS "Corrected SOABI: ${Python_SOABI}")
elseif("${Python_INTERPRETER_ID}" STREQUAL "PyPy")
message(STATUS "PyPy SOABI: ${Python_SOABI}")
execute_process(
COMMAND "${Python_EXECUTABLE}" -c

View File

@ -22,7 +22,7 @@ copyright = '2021, Max Bachmann'
author = 'Max Bachmann'
# The full version, including alpha/beta/rc tags
release = '2.10.1'
release = '2.10.2'
# -- General configuration ---------------------------------------------------

View File

@ -11,7 +11,7 @@ with open('README.md', 'rt', encoding="utf8") as f:
setup_args = {
"name": "rapidfuzz",
"version": "2.10.1",
"version": "2.10.2",
"install_requires": ["jarowinkler >= 1.2.2, < 2.0.0"],
"extras_require": {'full': ['numpy']},
"url": "https://github.com/maxbachmann/RapidFuzz",

View File

@ -10,23 +10,35 @@ function(create_cython_target _name)
endif()
endfunction(create_cython_target)
function(rf_add_library name)
if(CMAKE_VERSION VERSION_LESS 3.17)
Python_add_library(${name} MODULE ${ARGV})
get_property(suffix TARGET ${name} PROPERTY SUFFIX)
if (NOT suffix)
set (suffix "${CMAKE_SHARED_MODULE_SUFFIX}")
endif()
set_property (TARGET ${name} PROPERTY SUFFIX ".${Python_SOABI}${suffix}")
else()
Python_add_library(${name} MODULE WITH_SOABI ${ARGV})
endif()
endfunction(rf_add_library)
create_cython_target(utils_cpp)
Python_add_library(utils_cpp MODULE WITH_SOABI ${utils_cpp} ${CMAKE_CURRENT_LIST_DIR}/utils.cpp)
rf_add_library(utils_cpp ${utils_cpp} ${CMAKE_CURRENT_LIST_DIR}/utils.cpp)
target_compile_features(utils_cpp PUBLIC cxx_std_17)
target_include_directories(utils_cpp PRIVATE ${RF_CAPI_PATH} ${RF_BASE_DIR}/rapidfuzz)
target_link_libraries(utils_cpp PRIVATE rapidfuzz::rapidfuzz)
install(TARGETS utils_cpp LIBRARY DESTINATION src/rapidfuzz)
create_cython_target(fuzz_cpp)
Python_add_library(fuzz_cpp MODULE WITH_SOABI ${fuzz_cpp})
rf_add_library(fuzz_cpp ${fuzz_cpp})
target_compile_features(fuzz_cpp PUBLIC cxx_std_17)
target_include_directories(fuzz_cpp PRIVATE ${RF_CAPI_PATH} ${RF_BASE_DIR}/rapidfuzz)
target_link_libraries(fuzz_cpp PRIVATE rapidfuzz::rapidfuzz)
install(TARGETS fuzz_cpp LIBRARY DESTINATION src/rapidfuzz)
create_cython_target(process_cpp_impl)
Python_add_library(process_cpp_impl MODULE WITH_SOABI ${process_cpp_impl})
rf_add_library(process_cpp_impl ${process_cpp_impl})
target_compile_features(process_cpp_impl PUBLIC cxx_std_17)
target_include_directories(process_cpp_impl PRIVATE ${RF_CAPI_PATH} ${RF_BASE_DIR}/rapidfuzz)
target_link_libraries(process_cpp_impl PRIVATE Taskflow::Taskflow rapidfuzz::rapidfuzz)

View File

@ -3,6 +3,6 @@ rapid string matching library
"""
__author__: str = "Max Bachmann"
__license__: str = "MIT"
__version__: str = "2.10.1"
__version__: str = "2.10.2"
from rapidfuzz import process, distance, fuzz, string_metric, utils

View File

@ -10,15 +10,28 @@ function(create_cython_target _name)
endif()
endfunction(create_cython_target)
function(rf_add_library name)
if(CMAKE_VERSION VERSION_LESS 3.17)
Python_add_library(${name} MODULE ${ARGV})
get_property(suffix TARGET ${name} PROPERTY SUFFIX)
if (NOT suffix)
set (suffix "${CMAKE_SHARED_MODULE_SUFFIX}")
endif()
set_property (TARGET ${name} PROPERTY SUFFIX ".${Python_SOABI}${suffix}")
else()
Python_add_library(${name} MODULE WITH_SOABI ${ARGV})
endif()
endfunction(rf_add_library)
create_cython_target(_initialize_cpp)
Python_add_library(_initialize_cpp MODULE WITH_SOABI ${_initialize_cpp})
rf_add_library(_initialize_cpp ${_initialize_cpp})
target_compile_features(_initialize_cpp PUBLIC cxx_std_17)
target_include_directories(_initialize_cpp PRIVATE ${RF_CAPI_PATH} ${RF_BASE_DIR}/rapidfuzz ${RF_BASE_DIR}/rapidfuzz/distance)
target_link_libraries(_initialize_cpp PRIVATE rapidfuzz::rapidfuzz)
install(TARGETS _initialize_cpp LIBRARY DESTINATION src/rapidfuzz/distance)
create_cython_target(metrics_cpp)
Python_add_library(metrics_cpp MODULE WITH_SOABI ${metrics_cpp})
rf_add_library(metrics_cpp ${metrics_cpp})
target_compile_features(metrics_cpp PUBLIC cxx_std_17)
target_include_directories(metrics_cpp PRIVATE ${RF_CAPI_PATH} ${RF_BASE_DIR}/rapidfuzz ${RF_BASE_DIR}/rapidfuzz/distance)
target_link_libraries(metrics_cpp PRIVATE rapidfuzz::rapidfuzz)