Merge pull request #189209 from bcdarwin/update-and-unbreak-hickle

This commit is contained in:
Sandro
2022-09-11 00:20:42 +02:00
committed by GitHub
2 changed files with 42 additions and 24 deletions
@@ -7,43 +7,33 @@
, astropy
, scipy
, pandas
, codecov
, pytest
, pytest-cov
, pytest-runner
, coveralls
, twine
, check-manifest
, pytestCheckHook
, lib
}:
buildPythonPackage rec {
pname = "hickle";
version = "4.0.4";
version = "5.0.2";
disabled = pythonOlder "3.5";
src = fetchPypi {
inherit pname version;
sha256 = "0d35030a76fe1c7fa6480088cde932689960ed354a2539ffaf5f3c90c578c06f";
hash = "sha256-2+7OF/a89jK/zLhbk/Q2A+zsKnfRbq3YMKGycEWsLEQ=";
};
postPatch = ''
substituteInPlace requirements_test.txt \
--replace 'astropy<3.1;' 'astropy;' --replace 'astropy<3.0;' 'astropy;'
substituteInPlace tox.ini --replace "--cov=./hickle" ""
'';
propagatedBuildInputs = [ h5py numpy dill ];
doCheck = false; # incompatible with latest astropy
checkInputs = [
pytest pytest-cov pytest-runner coveralls scipy pandas astropy twine check-manifest codecov
pytestCheckHook scipy pandas astropy
];
pythonImportsCheck = [ "hickle" ];
meta = {
# incompatible with h5py>=3.0, see https://github.com/telegraphic/hickle/issues/143
broken = true;
description = "Serialize Python data to HDF5";
homepage = "https://github.com/telegraphic/hickle";
license = lib.licenses.mit;
@@ -1,16 +1,27 @@
{ buildPythonPackage
, fetchFromGitHub
, pythonOlder
, pytest
, pytestCheckHook
, albumentations
, dill
, h5py
, hickle
, numpy
, opencv4
, pandas
, pillow
, prodict
, pycm
, pyyaml
, scipy
, requests
, scikitimage
, six
, tabulate
, torch
, torchvision
, tqdm
, yacs
, lib
}:
@@ -27,17 +38,34 @@ buildPythonPackage rec {
sha256 = "0wnijdvqgdpzfdsy1cga3bsr0n7zzsl8hp4dskqwxx087g5h1r84";
};
postPatch = ''
substituteInPlace setup.py --replace "opencv-python-headless" "opencv"
'';
propagatedBuildInputs = [
h5py hickle numpy pandas pillow six torch torchvision tqdm
albumentations
dill
h5py
hickle
numpy
opencv4
pandas
pillow
prodict
pycm
pyyaml
scipy
requests
scikitimage
tabulate
torch
torchvision
tqdm
six
yacs
];
checkInputs = [ pytest ];
checkPhase = ''
runHook preCheck
pytest tests/
runHook postCheck
'';
checkInputs = [ pytestCheckHook ];
meta = {
description = "High-level training framework for Pytorch";