python3.pkgs.linear_operator: use setuptools-scm to get version (#250240)

authored by

Theodore Ni and committed by
GitHub
5ff791b8 f410499c

+15 -7
+15 -7
pkgs/development/python-modules/linear_operator/default.nix
··· 2 , buildPythonPackage 3 , fetchFromGitHub 4 , jaxtyping 5 , scipy 6 , torch 7 - , pytestCheckHook 8 }: 9 10 buildPythonPackage rec { ··· 19 hash = "sha256-7NkcvVDwFaLHBZZhq7aKY3cWxe90qeKmodP6cVsdrPM="; 20 }; 21 22 - postPatch = '' 23 - substituteInPlace setup.py \ 24 - --replace 'find_version("linear_operator", "version.py")' \"$version\" 25 - ''; 26 27 propagatedBuildInputs = [ 28 jaxtyping ··· 30 torch 31 ]; 32 33 - checkInputs = [ 34 pytestCheckHook 35 ]; 36 - pythonImportsCheck = [ "linear_operator" ]; 37 disabledTests = [ 38 # flaky numerical tests 39 "test_svd"
··· 2 , buildPythonPackage 3 , fetchFromGitHub 4 , jaxtyping 5 + , pytestCheckHook 6 , scipy 7 + , setuptools 8 + , setuptools-scm 9 , torch 10 + , wheel 11 }: 12 13 buildPythonPackage rec { ··· 22 hash = "sha256-7NkcvVDwFaLHBZZhq7aKY3cWxe90qeKmodP6cVsdrPM="; 23 }; 24 25 + env.SETUPTOOLS_SCM_PRETEND_VERSION = version; 26 + 27 + nativeBuildInputs = [ 28 + setuptools 29 + setuptools-scm 30 + wheel 31 + ]; 32 33 propagatedBuildInputs = [ 34 jaxtyping ··· 36 torch 37 ]; 38 39 + pythonImportsCheck = [ "linear_operator" ]; 40 + 41 + nativeCheckInputs = [ 42 pytestCheckHook 43 ]; 44 + 45 disabledTests = [ 46 # flaky numerical tests 47 "test_svd"