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