From 63ff0f7ca6cac5711e76c8d15b90ef736ab5adb7 Mon Sep 17 00:00:00 2001 From: Theodore Ni <3806110+tjni@users.noreply.github.com> Date: Thu, 24 Aug 2023 17:33:54 -0700 Subject: [PATCH] python310Packages.gpytorch: integrate setuptools-scm build dependency --- .../python-modules/gpytorch/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/gpytorch/default.nix b/pkgs/development/python-modules/gpytorch/default.nix index 74d85d801f69..1fea3699d9f5 100644 --- a/pkgs/development/python-modules/gpytorch/default.nix +++ b/pkgs/development/python-modules/gpytorch/default.nix @@ -3,6 +3,9 @@ , fetchFromGitHub , linear_operator , scikit-learn +, setuptools +, setuptools-scm +, wheel , torch , pytestCheckHook }: @@ -19,10 +22,13 @@ buildPythonPackage rec { hash = "sha256-cpkfjx5G/4duL1Rr4nkHTHi03TDcYbcx3bKP2Ny7Ijo="; }; - postPatch = '' - substituteInPlace setup.py \ - --replace 'find_version("gpytorch", "version.py")' \"$version\" - ''; + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; + + nativeBuildInputs = [ + setuptools + setuptools-scm + wheel + ]; propagatedBuildInputs = [ linear_operator @@ -33,7 +39,9 @@ buildPythonPackage rec { checkInputs = [ pytestCheckHook ]; + pythonImportsCheck = [ "gpytorch" ]; + disabledTests = [ # AssertionError on number of warnings emitted "test_deprecated_methods"