python312Packages.levenshtein: format with nixfmt
This commit is contained in:
parent
67648e566f
commit
576b9e6eaf
1 changed files with 22 additions and 27 deletions
|
@ -1,14 +1,15 @@
|
||||||
{ lib
|
{
|
||||||
, stdenv
|
lib,
|
||||||
, buildPythonPackage
|
stdenv,
|
||||||
, cmake
|
buildPythonPackage,
|
||||||
, cython
|
cmake,
|
||||||
, fetchFromGitHub
|
cython,
|
||||||
, pytestCheckHook
|
fetchFromGitHub,
|
||||||
, pythonOlder
|
pytestCheckHook,
|
||||||
, rapidfuzz
|
pythonOlder,
|
||||||
, rapidfuzz-cpp
|
rapidfuzz,
|
||||||
, scikit-build
|
rapidfuzz-cpp,
|
||||||
|
scikit-build,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
|
@ -23,7 +24,7 @@ buildPythonPackage rec {
|
||||||
repo = "Levenshtein";
|
repo = "Levenshtein";
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${version}";
|
||||||
hash = "sha256-ye2XQL/ZQPlA4dy3tlr03WyGhfl7SaOXMt10cWHnW5o=";
|
hash = "sha256-ye2XQL/ZQPlA4dy3tlr03WyGhfl7SaOXMt10cWHnW5o=";
|
||||||
fetchSubmodules = true; ## for vendored `rapidfuzz-cpp`
|
fetchSubmodules = true; # # for vendored `rapidfuzz-cpp`
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -34,25 +35,19 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
dontUseCmakeConfigure = true;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [ rapidfuzz-cpp ];
|
||||||
rapidfuzz-cpp
|
|
||||||
];
|
|
||||||
|
|
||||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
|
env.NIX_CFLAGS_COMPILE = toString (
|
||||||
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
|
lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
|
||||||
]);
|
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
dependencies = [ rapidfuzz ];
|
||||||
rapidfuzz
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
nativeCheckInputs = [ pytestCheckHook ];
|
||||||
pytestCheckHook
|
|
||||||
];
|
|
||||||
|
|
||||||
pythonImportsCheck = [
|
pythonImportsCheck = [ "Levenshtein" ];
|
||||||
"Levenshtein"
|
|
||||||
];
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Functions for fast computation of Levenshtein distance and string similarity";
|
description = "Functions for fast computation of Levenshtein distance and string similarity";
|
||||||
|
|
Loading…
Reference in a new issue