From 14ed11bf18bf45a35a994ef8ecc72f2f6e3ffd0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Mon, 4 Jan 2021 10:41:03 +0100 Subject: [PATCH] pythonPackages.fastdiff: init at 0.2.0 --- .../python-modules/fastdiff/default.nix | 30 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/development/python-modules/fastdiff/default.nix diff --git a/pkgs/development/python-modules/fastdiff/default.nix b/pkgs/development/python-modules/fastdiff/default.nix new file mode 100644 index 000000000000..b3e27d7a5e81 --- /dev/null +++ b/pkgs/development/python-modules/fastdiff/default.nix @@ -0,0 +1,30 @@ +{ lib, buildPythonPackage, fetchPypi, pytestCheckHook, pytest-benchmark, wasmer }: + +buildPythonPackage rec { + pname = "fastdiff"; + version = "0.2.0"; + + src = fetchPypi { + inherit pname version; + sha256 = "1ai95vjchl4396zjl1b69xfqvn9kn1y7c40d9l0qxdss0pcx6fk2"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'pytest-runner' "" + ''; + + propagatedBuildInputs = [ wasmer ]; + + checkInputs = [ pytestCheckHook pytest-benchmark ]; + + pythonImportsCheck = [ "fastdiff" ]; + disabledTests = [ "test_native" ]; + + meta = with lib; { + description = "A fast native implementation of diff algorithm with a pure Python fallback"; + homepage = "https://github.com/syrusakbary/fastdiff"; + license = licenses.mit; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 34091d7fe2eb..89c3c64db198 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2071,6 +2071,8 @@ in { fastcache = callPackage ../development/python-modules/fastcache { }; + fastdiff = callPackage ../development/python-modules/fastdiff { }; + fastdtw = callPackage ../development/python-modules/fastdtw { }; fastecdsa = callPackage ../development/python-modules/fastecdsa { };