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 <dmitry.kalinkin@gmail.com>

---------

Co-authored-by: Dmitry Kalinkin <dmitry.kalinkin@gmail.com>
This commit is contained in:
Jörg Thalheim 2023-08-11 06:57:01 +01:00 committed by GitHub
parent 85d724f49a
commit c1cf0594fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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