python310Packages.rapidfuzz: make numpy optional

`numpy` is now an _optional_ dependency, which is consistent with
upstream and greatly reduces the closure size (by ~300 MiB).

References:
- Upstream setup.py: https://github.com/maxbachmann/RapidFuzz/blob/main/setup.py

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
This commit is contained in:
bryango 2023-09-29 17:41:57 +08:00 committed by Jörg Thalheim
parent f4098e348c
commit fb67928155

View File

@ -55,9 +55,9 @@ buildPythonPackage rec {
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
]);
propagatedBuildInputs = [
numpy
];
passthru.optional-dependencies = {
full = [ numpy ];
};
preCheck = ''
export RAPIDFUZZ_IMPLEMENTATION=cpp