summary refs log tree commit diff
path: root/pkgs/development/python-modules/smart-open/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/smart-open/default.nix')
-rw-r--r--pkgs/development/python-modules/smart-open/default.nix49
1 files changed, 36 insertions, 13 deletions
diff --git a/pkgs/development/python-modules/smart-open/default.nix b/pkgs/development/python-modules/smart-open/default.nix
index e0d7757d0bf..df0cbdc8a01 100644
--- a/pkgs/development/python-modules/smart-open/default.nix
+++ b/pkgs/development/python-modules/smart-open/default.nix
@@ -11,11 +11,12 @@
 , moto
 , paramiko
 , pytestCheckHook
+, responses
 }:
 
 buildPythonPackage rec {
   pname = "smart-open";
-  version = "6.3.0";
+  version = "6.4.0";
   format = "setuptools";
 
   disabled = pythonOlder "3.6";
@@ -24,30 +25,52 @@ buildPythonPackage rec {
     owner = "RaRe-Technologies";
     repo = "smart_open";
     rev = "refs/tags/v${version}";
-    hash = "sha256-sVKrCph5M7xsE7gtzsP/eVEbZyFfoucW3p30YYpwVFI=";
+    hash = "sha256-fciNaVw603FAcgrSrND+LEycJffmnFQij2ZpatYZ/e4=";
   };
 
-  propagatedBuildInputs = [
-    azure-common
-    azure-core
-    azure-storage-blob
-    boto3
-    google-cloud-storage
-    requests
+  passthru.optional-dependencies = {
+    s3 = [
+      boto3
+    ];
+    gcs = [
+      google-cloud-storage
+    ];
+    azure = [
+      azure-storage-blob
+      azure-common
+      azure-core
+    ];
+    http = [
+      requests
+    ];
+    webhdfs = [
+      requests
+    ];
+    ssh = [
+      paramiko
+    ];
+  };
+
+  pythonImportsCheck = [
+    "smart_open"
   ];
 
   nativeCheckInputs = [
     moto
-    paramiko
     pytestCheckHook
-  ];
+    responses
+  ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
 
   pytestFlagsArray = [
     "smart_open"
   ];
 
-  pythonImportsCheck = [
-    "smart_open"
+  disabledTests = [
+    # https://github.com/RaRe-Technologies/smart_open/issues/784
+    "test_https_seek_forward"
+    "test_seek_from_current"
+    "test_seek_from_end"
+    "test_seek_from_start"
   ];
 
   meta = with lib; {