about summary refs log tree commit diff
path: root/pkgs/development/python-modules/python-glanceclient/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/python-glanceclient/default.nix')
-rw-r--r--pkgs/development/python-modules/python-glanceclient/default.nix73
1 files changed, 45 insertions, 28 deletions
diff --git a/pkgs/development/python-modules/python-glanceclient/default.nix b/pkgs/development/python-modules/python-glanceclient/default.nix
index 9fd1f21a083d8..0130c690ef4c3 100644
--- a/pkgs/development/python-modules/python-glanceclient/default.nix
+++ b/pkgs/development/python-modules/python-glanceclient/default.nix
@@ -1,40 +1,57 @@
-{ lib
-, buildPythonPackage
-, fetchPypi
-, coreutils
-, pbr
-, prettytable
-, keystoneauth1
-, requests
-, warlock
-, oslo-utils
-, oslo-i18n
-, wrapt
-, pyopenssl
-, pythonOlder
-, stestr
-, testscenarios
-, ddt
-, requests-mock
+{
+  lib,
+  buildPythonPackage,
+  fetchPypi,
+  coreutils,
+  setuptools,
+  pbr,
+  prettytable,
+  keystoneauth1,
+  requests,
+  warlock,
+  oslo-utils,
+  oslo-i18n,
+  wrapt,
+  pyopenssl,
+  pythonOlder,
+  stestr,
+  testscenarios,
+  ddt,
+  requests-mock,
+  writeText,
 }:
-
-buildPythonPackage rec {
+let
   pname = "python-glanceclient";
-  version = "4.5.0";
-  format = "setuptools";
+  version = "4.6.0";
+
+  disabledTests = [
+    "test_http_chunked_response"
+    "test_v1_download_has_no_stray_output_to_stdout"
+    "test_v2_requests_valid_cert_verification"
+    "test_download_has_no_stray_output_to_stdout"
+    "test_v2_download_has_no_stray_output_to_stdout"
+    "test_v2_requests_valid_cert_verification_no_compression"
+    "test_log_request_id_once"
+  ];
+in
+buildPythonPackage {
+  inherit pname version;
+  pyproject = true;
 
   disabled = pythonOlder "3.8";
 
   src = fetchPypi {
     inherit pname version;
-    hash = "sha256-ZGTE1be+S/4Tbhw6Px+9qMgkNTZgoDn6lnAJhNvVYuA=";
+    hash = "sha256-gJm4TzxtIjvkpOlbN82MPbY0JmDdiwlEMGGxZvTR+Po=";
   };
 
   postPatch = ''
     substituteInPlace glanceclient/tests/unit/v1/test_shell.py \
-      --replace "/bin/echo" "${coreutils}/bin/echo"
+      --replace-fail "/bin/echo" "${lib.getExe' coreutils "echo"}"
   '';
 
+  nativeBuildInputs = [ setuptools ];
+
   propagatedBuildInputs = [
     pbr
     prettytable
@@ -55,12 +72,12 @@ buildPythonPackage rec {
   ];
 
   checkPhase = ''
-    stestr run
+    runHook preCheck
+    stestr run -e ${writeText "disabled-tests" (lib.concatStringsSep "\n" disabledTests)}
+    runHook postCheck
   '';
 
-  pythonImportsCheck = [
-    "glanceclient"
-  ];
+  pythonImportsCheck = [ "glanceclient" ];
 
   meta = with lib; {
     description = "Python bindings for the OpenStack Images API";