python3Packages.gradient-utils: fix build

This commit is contained in:
Fabian Affolter 2021-03-16 09:30:55 +01:00 committed by Tim Steinbach
parent 41f345cbfc
commit 459315303c

View File

@ -1,12 +1,13 @@
{ buildPythonPackage
{ lib
, buildPythonPackage
, fetchFromGitHub
, hyperopt
, lib
, mock
, numpy
, poetry
, poetry-core
, prometheus_client
, pytestCheckHook
, requests
}:
buildPythonPackage rec {
@ -24,23 +25,39 @@ buildPythonPackage rec {
postPatch = ''
substituteInPlace pyproject.toml \
--replace 'numpy = "1.18.5"' 'numpy = "^1.18.5"' \
--replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"'
--replace 'hyperopt = "0.1.2"' 'hyperopt = ">=0.1.2"' \
--replace 'wheel = "^0.35.1"' 'wheel = "^0.36"'
'';
nativeBuildInputs = [ poetry ];
checkInputs = [ mock pytestCheckHook ];
propagatedBuildInputs = [ hyperopt prometheus_client numpy ];
nativeBuildInputs = [ poetry-core ];
propagatedBuildInputs = [
hyperopt
prometheus_client
numpy
];
checkInputs = [
mock
requests
pytestCheckHook
];
preCheck = ''
export HOSTNAME=myhost-experimentId
'';
preCheck = "export HOSTNAME=myhost-experimentId";
disabledTests = [
"test_add_metrics_pushes_metrics" # requires a working prometheus push gateway
];
pythonImportsCheck = [ "gradient_utils" ];
meta = with lib; {
description = "Gradient ML SDK";
homepage = "https://github.com/Paperspace/gradient-utils";
license = licenses.mit;
platforms = platforms.unix;
description = "Python utils and helpers library for Gradient";
homepage = "https://github.com/Paperspace/gradient-utils";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ freezeboy ];
};
}