depot/third_party/nixpkgs/pkgs/development/python-modules/oldest-supported-numpy/default.nix
Default email d5f4a57cbf Project import generated by Copybara.
GitOrigin-RevId: ce5e4a6ef2e59d89a971bc434ca8ca222b9c7f5e
2023-08-10 09:59:29 +02:00

40 lines
1.1 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, numpy
}:
buildPythonPackage rec {
pname = "oldest-supported-numpy";
version = "2023.8.3";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-yJp+wzsihagnI3crGPDBo+CqbVO4Xhxulj/o/NitxU0=";
};
# 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>='
'';
nativeBuildInputs = [
numpy
];
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 ];
};
}