diff options
Diffstat (limited to 'devel/py-Levenshtein')
15 files changed, 4 insertions, 312 deletions
diff --git a/devel/py-Levenshtein/Makefile b/devel/py-Levenshtein/Makefile index f5fd15865286..840a48af9af0 100644 --- a/devel/py-Levenshtein/Makefile +++ b/devel/py-Levenshtein/Makefile @@ -1,5 +1,5 @@ PORTNAME= Levenshtein -PORTVERSION= 0.22.0 +PORTVERSION= 0.25.1 CATEGORIES= devel python MASTER_SITES= PYPI PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/devel/py-Levenshtein/distinfo b/devel/py-Levenshtein/distinfo index c6946ef8d36d..be8ef0397e9b 100644 --- a/devel/py-Levenshtein/distinfo +++ b/devel/py-Levenshtein/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1695813323 -SHA256 (Levenshtein-0.22.0.tar.gz) = 86d285d770551cb648d4fcfe5243449a479e694e56b65272dc6cbda879012051 -SIZE (Levenshtein-0.22.0.tar.gz) = 141819 +TIMESTAMP = 1751974763 +SHA256 (Levenshtein-0.25.1.tar.gz) = 2df14471c778c75ffbd59cb64bbecfd4b0ef320ef9f80e4804764be7d5678980 +SIZE (Levenshtein-0.25.1.tar.gz) = 149954 diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_details_SplittedSentenceView.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_details_SplittedSentenceView.hpp deleted file mode 100644 index 546673980790..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_details_SplittedSentenceView.hpp +++ /dev/null @@ -1,36 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/details/SplittedSentenceView.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/details/SplittedSentenceView.hpp -@@ -34,7 +34,7 @@ class SplittedSentenceView { (public) - return m_sentence.size(); - } - -- std::basic_string<CharT> join() const; -+ std::vector<CharT> join() const; - - const RangeVec<InputIt>& words() const - { -@@ -68,19 +68,19 @@ template <typename InputIt> - } - - template <typename InputIt> --auto SplittedSentenceView<InputIt>::join() const -> std::basic_string<CharT> -+auto SplittedSentenceView<InputIt>::join() const -> std::vector<CharT> - { - if (m_sentence.empty()) { -- return std::basic_string<CharT>(); -+ return std::vector<CharT>(); - } - - auto sentence_iter = m_sentence.begin(); -- std::basic_string<CharT> joined(sentence_iter->begin(), sentence_iter->end()); -- const std::basic_string<CharT> whitespace{0x20}; -+ std::vector<CharT> joined(sentence_iter->begin(), sentence_iter->end()); -+ const std::vector<CharT> whitespace{0x20}; - ++sentence_iter; - for (; sentence_iter != m_sentence.end(); ++sentence_iter) { - joined.append(whitespace) -- .append(std::basic_string<CharT>(sentence_iter->begin(), sentence_iter->end())); -+ .append(std::vector<CharT>(sentence_iter->begin(), sentence_iter->end())); - } - return joined; - } diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance.hpp deleted file mode 100644 index 602c5e34b65e..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance.hpp +++ /dev/null @@ -1,53 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance.hpp -@@ -16,13 +16,13 @@ template <typename CharT, typename InputIt1, typename - namespace rapidfuzz { - - template <typename CharT, typename InputIt1, typename InputIt2> --std::basic_string<CharT> editops_apply(const Editops& ops, InputIt1 first1, InputIt1 last1, InputIt2 first2, -- InputIt2 last2) -+std::vector<CharT> editops_apply(const Editops& ops, InputIt1 first1, InputIt1 last1, InputIt2 first2, -+ InputIt2 last2) - { - auto len1 = static_cast<size_t>(std::distance(first1, last1)); - auto len2 = static_cast<size_t>(std::distance(first2, last2)); - -- std::basic_string<CharT> res_str; -+ std::vector<CharT> res_str; - res_str.resize(len1 + len2); - size_t src_pos = 0; - size_t dest_pos = 0; -@@ -62,20 +62,20 @@ template <typename CharT, typename Sentence1, typename - } - - template <typename CharT, typename Sentence1, typename Sentence2> --std::basic_string<CharT> editops_apply(const Editops& ops, const Sentence1& s1, const Sentence2& s2) -+std::vector<CharT> editops_apply(const Editops& ops, const Sentence1& s1, const Sentence2& s2) - { - return editops_apply<CharT>(ops, detail::to_begin(s1), detail::to_end(s1), detail::to_begin(s2), - detail::to_end(s2)); - } - - template <typename CharT, typename InputIt1, typename InputIt2> --std::basic_string<CharT> opcodes_apply(const Opcodes& ops, InputIt1 first1, InputIt1 last1, InputIt2 first2, -- InputIt2 last2) -+std::vector<CharT> opcodes_apply(const Opcodes& ops, InputIt1 first1, InputIt1 last1, InputIt2 first2, -+ InputIt2 last2) - { - auto len1 = static_cast<size_t>(std::distance(first1, last1)); - auto len2 = static_cast<size_t>(std::distance(first2, last2)); - -- std::basic_string<CharT> res_str; -+ std::vector<CharT> res_str; - res_str.resize(len1 + len2); - size_t dest_pos = 0; - -@@ -101,7 +101,7 @@ template <typename CharT, typename Sentence1, typename - } - - template <typename CharT, typename Sentence1, typename Sentence2> --std::basic_string<CharT> opcodes_apply(const Opcodes& ops, const Sentence1& s1, const Sentence2& s2) -+std::vector<CharT> opcodes_apply(const Opcodes& ops, const Sentence1& s1, const Sentence2& s2) - { - return opcodes_apply<CharT>(ops, detail::to_begin(s1), detail::to_end(s1), detail::to_begin(s2), - detail::to_end(s2)); diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_DamerauLevenshtein.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_DamerauLevenshtein.hpp deleted file mode 100644 index 95b23aadc2c2..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_DamerauLevenshtein.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/DamerauLevenshtein.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/DamerauLevenshtein.hpp -@@ -140,7 +140,7 @@ struct CachedDamerauLevenshtein : public detail::Cache - return damerau_levenshtein_distance(s1, s2, score_cutoff); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - }; - - template <typename Sentence1> diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Hamming.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Hamming.hpp deleted file mode 100644 index 7c225ec047fa..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Hamming.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/Hamming.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/Hamming.hpp -@@ -159,7 +159,7 @@ struct CachedHamming : public detail::CachedDistanceBa - return detail::Hamming::distance(s1, s2, pad, score_cutoff, score_hint); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - bool pad; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Jaro.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Jaro.hpp deleted file mode 100644 index d6ba8bc5a57e..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Jaro.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/Jaro.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/Jaro.hpp -@@ -88,7 +88,7 @@ struct CachedJaro : public detail::CachedSimilarityBas - return detail::jaro_similarity(PM, detail::Range(s1), s2, score_cutoff); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - detail::BlockPatternMatchVector PM; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_JaroWinkler.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_JaroWinkler.hpp deleted file mode 100644 index a20d6b3579f5..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_JaroWinkler.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/JaroWinkler.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/JaroWinkler.hpp -@@ -103,7 +103,7 @@ struct CachedJaroWinkler : public detail::CachedSimila - } - - double prefix_weight; -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - detail::BlockPatternMatchVector PM; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_LCSseq.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_LCSseq.hpp deleted file mode 100644 index 0aa3b4472549..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_LCSseq.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/LCSseq.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/LCSseq.hpp -@@ -224,7 +224,7 @@ struct CachedLCSseq (private) - return detail::lcs_seq_similarity(PM, detail::Range(s1), s2, score_cutoff); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - detail::BlockPatternMatchVector PM; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Levenshtein.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Levenshtein.hpp deleted file mode 100644 index 058fbc79a5e0..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Levenshtein.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/Levenshtein.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/Levenshtein.hpp -@@ -476,7 +476,7 @@ struct CachedLevenshtein : public detail::CachedDistan - return detail::generalized_levenshtein_distance(detail::Range(s1), s2, weights, score_cutoff); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - detail::BlockPatternMatchVector PM; - LevenshteinWeightTable weights; - }; diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_OSA.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_OSA.hpp deleted file mode 100644 index 55a42cf4a3ec..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_OSA.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/OSA.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/OSA.hpp -@@ -267,7 +267,7 @@ struct CachedOSA (private) - return (res <= score_cutoff) ? res : score_cutoff + 1; - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - detail::BlockPatternMatchVector PM; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Postfix.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Postfix.hpp deleted file mode 100644 index 65b02611d17d..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Postfix.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/Postfix.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/Postfix.hpp -@@ -91,7 +91,7 @@ struct CachedPostfix : public detail::CachedSimilarity - return detail::Postfix::similarity(s1, s2, score_cutoff, score_hint); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - }; - - template <typename Sentence1> diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Prefix.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Prefix.hpp deleted file mode 100644 index feb0c3bdb25f..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_distance_Prefix.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/distance/Prefix.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/distance/Prefix.hpp -@@ -91,7 +91,7 @@ struct CachedPrefix : public detail::CachedSimilarityB - return detail::Prefix::similarity(s1, s2, score_cutoff, score_cutoff); - } - -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - }; - - template <typename Sentence1> diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.hpp b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.hpp deleted file mode 100644 index 51653b042b35..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.hpp +++ /dev/null @@ -1,100 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/fuzz.hpp.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/fuzz.hpp -@@ -186,7 +186,7 @@ struct CachedPartialRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - rapidfuzz::detail::CharSet<CharT1> s1_char_set; - CachedRatio<CharT1> cached_ratio; - }; -@@ -296,7 +296,7 @@ struct CachedTokenSortRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1_sorted; -+ std::vector<CharT1> s1_sorted; - CachedRatio<CharT1> cached_ratio; - }; - -@@ -354,7 +354,7 @@ struct CachedPartialTokenSortRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1_sorted; -+ std::vector<CharT1> s1_sorted; - CachedPartialRatio<CharT1> cached_partial_ratio; - }; - -@@ -422,8 +422,8 @@ struct CachedTokenSetRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; -+ std::vector<CharT1> s1; -+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; - }; - - template <typename Sentence1> -@@ -479,8 +479,8 @@ struct CachedPartialTokenSetRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; -+ std::vector<CharT1> s1; -+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; - }; - - template <typename Sentence1> -@@ -539,9 +539,9 @@ struct CachedTokenRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> s1_tokens; -- std::basic_string<CharT1> s1_sorted; -+ std::vector<CharT1> s1; -+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> s1_tokens; -+ std::vector<CharT1> s1_sorted; - CachedRatio<CharT1> cached_ratio_s1_sorted; - }; - -@@ -601,9 +601,9 @@ struct CachedPartialTokenRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; -- std::basic_string<CharT1> s1_sorted; -+ std::vector<CharT1> s1; -+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; -+ std::vector<CharT1> s1_sorted; - }; - - template <typename Sentence1> -@@ -659,10 +659,10 @@ struct CachedWRatio { (private) - private: - // todo somehow implement this using other ratios with creating PatternMatchVector - // multiple times -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - CachedPartialRatio<CharT1> cached_partial_ratio; -- detail::SplittedSentenceView<typename std::basic_string<CharT1>::iterator> tokens_s1; -- std::basic_string<CharT1> s1_sorted; -+ detail::SplittedSentenceView<typename std::vector<CharT1>::iterator> tokens_s1; -+ std::vector<CharT1> s1_sorted; - rapidfuzz::detail::BlockPatternMatchVector blockmap_s1_sorted; - }; - -@@ -774,7 +774,7 @@ struct CachedQRatio { (private) - double similarity(const Sentence2& s2, double score_cutoff = 0.0, double score_hint = 0.0) const; - - private: -- std::basic_string<CharT1> s1; -+ std::vector<CharT1> s1; - CachedRatio<CharT1> cached_ratio; - }; - diff --git a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.impl b/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.impl deleted file mode 100644 index 69c076798516..000000000000 --- a/devel/py-Levenshtein/files/patch-extern_rapidfuzz-cpp_rapidfuzz_fuzz.impl +++ /dev/null @@ -1,20 +0,0 @@ ---- extern/rapidfuzz-cpp/rapidfuzz/fuzz.impl.orig 2023-09-26 11:15:29 UTC -+++ extern/rapidfuzz-cpp/rapidfuzz/fuzz.impl -@@ -613,7 +613,7 @@ template <typename CharT1, typename InputIt1, typename - - // todo this is a temporary solution until WRatio is properly implemented using other scorers - template <typename CharT1, typename InputIt1, typename InputIt2> --double token_ratio(const std::basic_string<CharT1>& s1_sorted, -+double token_ratio(const std::vector<CharT1>& s1_sorted, - const rapidfuzz::detail::SplittedSentenceView<InputIt1>& tokens_s1, - const detail::BlockPatternMatchVector& blockmap_s1_sorted, InputIt2 first2, InputIt2 last2, - double score_cutoff) -@@ -729,7 +729,7 @@ template <typename CharT1, typename InputIt1, typename - - namespace fuzz_detail { - template <typename CharT1, typename InputIt1, typename InputIt2> --double partial_token_ratio(const std::basic_string<CharT1>& s1_sorted, -+double partial_token_ratio(const std::vector<CharT1>& s1_sorted, - const rapidfuzz::detail::SplittedSentenceView<InputIt1>& tokens_s1, - InputIt2 first2, InputIt2 last2, double score_cutoff) - { |