about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix41
1 files changed, 29 insertions, 12 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix b/nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix
index cf0ffb6bb417..ee8d1bde6222 100644
--- a/nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/gradient-utils/default.nix
@@ -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 = "*"'
   '';
 
-  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 ];
   };
 }