2023-08-10 07:59:29 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, numpy
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "oldest-supported-numpy";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2023.12.21";
|
2023-08-10 07:59:29 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-cdicMbtWeBTkfi4mjrLpK2+Z9c529MPbMIM2JOnvKeA=";
|
2023-08-10 07:59:29 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# The purpose of oldest-supported-numpy is to build a project against the
|
|
|
|
# oldest version of numpy for a given Python distribution in order to build
|
|
|
|
# a binary that is compatible with the largest possible versons of numpy.
|
|
|
|
# We only build against one version of numpy in nixpkgs, so instead we only
|
|
|
|
# want to make sure that we have a version above the minimum.
|
|
|
|
#
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.cfg \
|
|
|
|
--replace 'numpy==' 'numpy>='
|
|
|
|
'';
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-08-10 07:59:29 +00:00
|
|
|
numpy
|
|
|
|
];
|
|
|
|
|
2023-10-09 19:29:22 +00:00
|
|
|
# package has no tests
|
2023-08-10 07:59:29 +00:00
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Meta-package providing the oldest supported Numpy for a given Python version and platform";
|
|
|
|
homepage = "https://github.com/scipy/oldest-supported-numpy";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ tjni ];
|
|
|
|
};
|
|
|
|
}
|