From cf5174b0ac2fe7e67bc1aad3445fe0fc62d31362 Mon Sep 17 00:00:00 2001 From: Dmitry Kalinkin Date: Mon, 10 Oct 2022 19:57:54 -0400 Subject: [PATCH] python3Packages.linear_operator: init at 0.4.0 --- .../linear_operator/default.nix | 46 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 48 insertions(+) create mode 100644 pkgs/development/python-modules/linear_operator/default.nix diff --git a/pkgs/development/python-modules/linear_operator/default.nix b/pkgs/development/python-modules/linear_operator/default.nix new file mode 100644 index 000000000000..48fb004c14c4 --- /dev/null +++ b/pkgs/development/python-modules/linear_operator/default.nix @@ -0,0 +1,46 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, scipy +, torch +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "linear_operator"; + version = "0.4.0"; + format = "pyproject"; + + src = fetchFromGitHub { + owner = "cornellius-gp"; + repo = pname; + rev = "v${version}"; + hash = "sha256-0f3F3k3xJACbx42jtwsAmjZwPAOfLywZs8VOrwWicc4="; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace 'find_version("linear_operator", "version.py")' \"$version\" + ''; + + propagatedBuildInputs = [ + scipy + torch + ]; + + checkInputs = [ + pytestCheckHook + ]; + pythonImportsCheck = [ "linear_operator" ]; + disabledTests = [ + # flaky numerical tests + "test_svd" + ]; + + meta = with lib; { + description = "A LinearOperator implementation to wrap the numerical nuts and bolts of GPyTorch"; + homepage = "https://github.com/cornellius-gp/linear_operator/"; + license = licenses.mit; + maintainers = with maintainers; [ veprbl ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 98e53a2931ac..e62258be3240 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5672,6 +5672,8 @@ self: super: with self; { limnoria = callPackage ../development/python-modules/limnoria { }; + linear_operator = callPackage ../development/python-modules/linear_operator { }; + linecache2 = callPackage ../development/python-modules/linecache2 { }; lineedit = callPackage ../development/python-modules/lineedit { };