From c1cf0594fd399fad4c4e1250c2e56e29462afc2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Fri, 11 Aug 2023 06:57:01 +0100 Subject: [PATCH] python3.pkgs.numba: report a valid version (#248316) * python3.pkgs.numba: report a valid version just now if packages check for a numba bigger than a specific version they will fail to find this package * Update pkgs/development/python-modules/numba/default.nix Co-authored-by: Dmitry Kalinkin --------- Co-authored-by: Dmitry Kalinkin --- pkgs/development/python-modules/numba/default.nix | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/numba/default.nix b/pkgs/development/python-modules/numba/default.nix index da0f72a43375..2e2d3a20badb 100644 --- a/pkgs/development/python-modules/numba/default.nix +++ b/pkgs/development/python-modules/numba/default.nix @@ -27,7 +27,8 @@ let inherit (cudaPackages) cudatoolkit; in buildPythonPackage rec { - # Using an untagged version, with numpy 1.25 support + # Using an untagged version, with numpy 1.25 support, when it's released + # also drop the versioneer patch in postPatch version = "unstable-2023-08-02"; pname = "numba"; format = "setuptools"; @@ -77,6 +78,13 @@ in buildPythonPackage rec { cuda_toolkit_lib_path = cudatoolkit.lib; }) ]; + # with untagged version we need to specify the correct version ourselves + + postPatch = '' + substituteInPlace setup.py --replace "version=versioneer.get_version()" "version='0.57.1'" + substituteInPlace numba/_version.py \ + --replace 'git_refnames = ""' 'git_refnames = "0.57.1"' + ''; postFixup = lib.optionalString cudaSupport '' find $out -type f \( -name '*.so' -or -name '*.so.*' \) | while read lib; do