summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules
diff options
context:
space:
mode:
authorRobert Schütz <dev@schuetz-co.de>2021-07-03 11:53:21 +0200
committerJonathan Ringer <jonringer@users.noreply.github.com>2021-07-05 12:34:02 -0700
commit24eb4933fbcfb191ef2f2b0900d1c83f2adbbb8b (patch)
tree46d6a1fc0f711944e434a3b780a89555854f84f8 /pkgs/development/python-modules
parent9ed4eacdfbadc2bf1eed17176508ef16db190dc6 (diff)
python3Packages.smart-open: 4.2.0 -> 5.1.0
Diffstat (limited to 'pkgs/development/python-modules')
-rw-r--r--pkgs/development/python-modules/smart-open/default.nix76
1 files changed, 56 insertions, 20 deletions
diff --git a/pkgs/development/python-modules/smart-open/default.nix b/pkgs/development/python-modules/smart-open/default.nix
index 051d6c97397d..d4ad901fb9b7 100644
--- a/pkgs/development/python-modules/smart-open/default.nix
+++ b/pkgs/development/python-modules/smart-open/default.nix
@@ -1,39 +1,75 @@
{ lib
, buildPythonPackage
-, fetchPypi
, pythonOlder
-, boto
+, fetchFromGitHub
+, azure-common
+, azure-core
+, azure-storage-blob
, boto3
-, bz2file
-, mock
-, moto
+, google-cloud-storage
, requests
-, responses
+, moto
+, parameterizedtestcase
+, pytestCheckHook
}:
buildPythonPackage rec {
pname = "smart-open";
- version = "4.2.0";
+ version = "5.1.0";
+
disabled = pythonOlder "3.5";
- src = fetchPypi {
- pname = "smart_open";
- inherit version;
- sha256 = "d9f5a0f173ccb9bbae528db5a3804f57145815774f77ef755b9b0f3b4b2a9dcb";
+ src = fetchFromGitHub {
+ owner = "RaRe-Technologies";
+ repo = "smart_open";
+ rev = "v${version}";
+ sha256 = "0gv3vxpglnhh6d80wsqigxi7psn6s7ylz20kx5ahblcx5rqyhjmi";
};
- # moto>=1.0.0 is backwards-incompatible and some tests fail with it,
- # so disable tests for now
- doCheck = false;
+ propagatedBuildInputs = [
+ azure-common
+ azure-core
+ azure-storage-blob
+ boto3
+ google-cloud-storage
+ requests
+ ];
+
+ checkInputs = [
+ moto
+ parameterizedtestcase
+ pytestCheckHook
+ ];
+
+ pytestFlagsArray = [ "smart_open" ];
+
+ disabledTestPaths = [
+ "smart_open/tests/test_http.py"
+ "smart_open/tests/test_s3.py"
+ "smart_open/tests/test_s3_version.py"
+ "smart_open/tests/test_sanity.py"
+ ];
- checkInputs = [ mock moto responses ];
+ disabledTests = [
+ "test_compression_invalid"
+ "test_gs_uri_contains_question_mark"
+ "test_gzip_compress_sanity"
+ "test_http"
+ "test_ignore_ext"
+ "test_initialize_write"
+ "test_read_explicit"
+ "test_s3_handles_querystring"
+ "test_s3_uri_contains_question_mark"
+ "test_webhdfs"
+ "test_write"
+ ];
- # upstream code requires both boto and boto3
- propagatedBuildInputs = [ boto boto3 bz2file requests ];
+ pythonImportsCheck = [ "smart_open" ];
- meta = {
- license = lib.licenses.mit;
+ meta = with lib; {
description = "Library for efficient streaming of very large file";
- maintainers = with lib.maintainers; [ jyp ];
+ homepage = "https://github.com/RaRe-Technologies/smart_open";
+ license = licenses.mit;
+ maintainers = with maintainers; [ jyp ];
};
}