python312Packages.levenshtein: format with nixfmt

This commit is contained in:
Fabian Affolter 2024-04-22 10:11:03 +02:00
parent 67648e566f
commit 576b9e6eaf

View file

@ -1,14 +1,15 @@
{ lib
, stdenv
, buildPythonPackage
, cmake
, cython
, fetchFromGitHub
, pytestCheckHook
, pythonOlder
, rapidfuzz
, rapidfuzz-cpp
, scikit-build
{
lib,
stdenv,
buildPythonPackage,
cmake,
cython,
fetchFromGitHub,
pytestCheckHook,
pythonOlder,
rapidfuzz,
rapidfuzz-cpp,
scikit-build,
}:
buildPythonPackage rec {
@ -23,7 +24,7 @@ buildPythonPackage rec {
repo = "Levenshtein";
rev = "refs/tags/v${version}";
hash = "sha256-ye2XQL/ZQPlA4dy3tlr03WyGhfl7SaOXMt10cWHnW5o=";
fetchSubmodules = true; ## for vendored `rapidfuzz-cpp`
fetchSubmodules = true; # # for vendored `rapidfuzz-cpp`
};
nativeBuildInputs = [
@ -34,25 +35,19 @@ buildPythonPackage rec {
dontUseCmakeConfigure = true;
buildInputs = [
rapidfuzz-cpp
];
buildInputs = [ rapidfuzz-cpp ];
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals (stdenv.cc.isClang && stdenv.isDarwin) [
"-fno-lto" # work around https://github.com/NixOS/nixpkgs/issues/19098
]);
]
);
propagatedBuildInputs = [
rapidfuzz
];
dependencies = [ rapidfuzz ];
nativeCheckInputs = [
pytestCheckHook
];
nativeCheckInputs = [ pytestCheckHook ];
pythonImportsCheck = [
"Levenshtein"
];
pythonImportsCheck = [ "Levenshtein" ];
meta = with lib; {
description = "Functions for fast computation of Levenshtein distance and string similarity";