Skip to content

Commit

Permalink
Merge pull request #250706 from tjni/jarowinkler
Browse files Browse the repository at this point in the history
python3.pkgs.jarowinkler: fix build dependencies
  • Loading branch information
natsukium authored Aug 23, 2023
2 parents c0b15de + 397c07e commit 7c86daf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 11 additions & 2 deletions pkgs/development/python-modules/jarowinkler/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
, rapidfuzz-capi
, scikit-build
, setuptools
, wheel
, jarowinkler-cpp
, hypothesis
, pytestCheckHook
Expand All @@ -16,25 +17,33 @@
buildPythonPackage rec {
pname = "jarowinkler";
version = "1.2.3";
format = "pyproject";

disabled = pythonOlder "3.6";

format = "pyproject";

src = fetchFromGitHub {
owner = "maxbachmann";
repo = "JaroWinkler";
rev = "refs/tags/v${version}";
hash = "sha256-j+ZabVsiVitNkTPhGjDg72XogjvPaL453lTW45ITm90=";
};

# We cannot use Cython version 3.0.0 because the code in jarowinkler has not
# been adapted for https://github.com/cython/cython/issues/4280 yet
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'scikit-build==' 'scikit-build>=' \
--replace 'Cython==3.0.0a11' 'Cython'
'';

nativeBuildInputs = [
cmake
cython
ninja
rapidfuzz-capi
scikit-build
setuptools
wheel
];

buildInputs = [
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5346,7 +5346,9 @@ self: super: with self; {

jaraco-text = callPackage ../development/python-modules/jaraco-text { };

jarowinkler = callPackage ../development/python-modules/jarowinkler { };
jarowinkler = callPackage ../development/python-modules/jarowinkler {
inherit (pkgs) cmake ninja;
};

javaobj-py3 = callPackage ../development/python-modules/javaobj-py3 { };

Expand Down

0 comments on commit 7c86daf

Please sign in to comment.