mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #202168 from tjni/h5py
python310Packages.h5py: remove unittest2 and six
This commit is contained in:
commit
82207cb22a
1 changed files with 29 additions and 9 deletions
|
@ -1,6 +1,17 @@
|
|||
{ lib, fetchPypi, isPy27, buildPythonPackage, pythonOlder
|
||||
, numpy, hdf5, cython, six, pkgconfig, unittest2
|
||||
, mpi4py ? null, openssh, pytestCheckHook, cached-property }:
|
||||
{ lib
|
||||
, fetchPypi
|
||||
, buildPythonPackage
|
||||
, pythonOlder
|
||||
, setuptools
|
||||
, numpy
|
||||
, hdf5
|
||||
, cython
|
||||
, pkgconfig
|
||||
, mpi4py ? null
|
||||
, openssh
|
||||
, pytestCheckHook
|
||||
, cached-property
|
||||
}:
|
||||
|
||||
assert hdf5.mpiSupport -> mpi4py != null && hdf5.mpi == mpi4py.mpi;
|
||||
|
||||
|
@ -10,7 +21,9 @@ let
|
|||
in buildPythonPackage rec {
|
||||
version = "3.7.0";
|
||||
pname = "h5py";
|
||||
disabled = isPy27;
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
|
@ -35,16 +48,23 @@ in buildPythonPackage rec {
|
|||
|
||||
preBuild = if mpiSupport then "export CC=${mpi}/bin/mpicc" else "";
|
||||
|
||||
# tests now require pytest-mpi, which isn't available and difficult to package
|
||||
doCheck = false;
|
||||
checkInputs = lib.optional isPy27 unittest2 ++ [ pytestCheckHook openssh ];
|
||||
nativeBuildInputs = [ pkgconfig cython ];
|
||||
nativeBuildInputs = [
|
||||
cython
|
||||
pkgconfig
|
||||
setuptools
|
||||
];
|
||||
|
||||
buildInputs = [ hdf5 ]
|
||||
++ lib.optional mpiSupport mpi;
|
||||
propagatedBuildInputs = [ numpy six]
|
||||
|
||||
propagatedBuildInputs = [ numpy ]
|
||||
++ lib.optionals mpiSupport [ mpi4py openssh ]
|
||||
++ lib.optionals (pythonOlder "3.8") [ cached-property ];
|
||||
|
||||
# tests now require pytest-mpi, which isn't available and difficult to package
|
||||
doCheck = false;
|
||||
checkInputs = [ pytestCheckHook openssh ];
|
||||
|
||||
pythonImportsCheck = [ "h5py" ];
|
||||
|
||||
meta = with lib; {
|
||||
|
|
Loading…
Reference in a new issue