about summary refs log tree commit diff
path: root/pkgs/development/python-modules/smart-open
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@gmail.com>2021-03-15 01:01:41 +0100
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-05-22 15:02:50 -0700
commitd6ff646b3f44b046326d9108546e033c16dac8d3 (patch)
tree5394d3473334dc18b00d88d76fc140a5265dda9d /pkgs/development/python-modules/smart-open
parent0197f1dc4198e79efed554a901d9fdf81551abb8 (diff)
pythonPackages.smart_open: rename to smart-open
Diffstat (limited to 'pkgs/development/python-modules/smart-open')
-rw-r--r--pkgs/development/python-modules/smart-open/default.nix39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/smart-open/default.nix b/pkgs/development/python-modules/smart-open/default.nix
new file mode 100644
index 0000000000000..051d6c97397d6
--- /dev/null
+++ b/pkgs/development/python-modules/smart-open/default.nix
@@ -0,0 +1,39 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pythonOlder
+, boto
+, boto3
+, bz2file
+, mock
+, moto
+, requests
+, responses
+}:
+
+buildPythonPackage rec {
+  pname = "smart-open";
+  version = "4.2.0";
+  disabled = pythonOlder "3.5";
+
+  src = fetchPypi {
+    pname = "smart_open";
+    inherit version;
+    sha256 = "d9f5a0f173ccb9bbae528db5a3804f57145815774f77ef755b9b0f3b4b2a9dcb";
+  };
+
+  # moto>=1.0.0 is backwards-incompatible and some tests fail with it,
+  # so disable tests for now
+  doCheck = false;
+
+  checkInputs = [ mock moto responses ];
+
+  # upstream code requires both boto and boto3
+  propagatedBuildInputs = [ boto boto3 bz2file requests ];
+
+  meta = {
+    license = lib.licenses.mit;
+    description = "Library for efficient streaming of very large file";
+    maintainers = with lib.maintainers; [ jyp ];
+  };
+}