1{ lib
2, buildPythonPackage
3, pythonOlder
4, fetchFromGitHub
5, azure-common
6, azure-core
7, azure-storage-blob
8, boto3
9, google-cloud-storage
10, requests
11, moto
12, parameterizedtestcase
13, pytestCheckHook
14}:
15
16buildPythonPackage rec {
17 pname = "smart-open";
18 version = "5.2.1";
19
20 disabled = pythonOlder "3.5";
21
22 src = fetchFromGitHub {
23 owner = "RaRe-Technologies";
24 repo = "smart_open";
25 rev = "v${version}";
26 sha256 = "13a1qsb4vwrhx45hz4qcl0d7bgv20ai5vsy7cq0q6qbj212nff19";
27 };
28
29 propagatedBuildInputs = [
30 azure-common
31 azure-core
32 azure-storage-blob
33 boto3
34 google-cloud-storage
35 requests
36 ];
37
38 checkInputs = [
39 moto
40 parameterizedtestcase
41 pytestCheckHook
42 ];
43
44 pytestFlagsArray = [ "smart_open" ];
45
46 disabledTestPaths = [
47 "smart_open/tests/test_http.py"
48 "smart_open/tests/test_s3.py"
49 "smart_open/tests/test_s3_version.py"
50 "smart_open/tests/test_sanity.py"
51 ];
52
53 disabledTests = [
54 "test_compression_invalid"
55 "test_gs_uri_contains_question_mark"
56 "test_gzip_compress_sanity"
57 "test_http"
58 "test_ignore_ext"
59 "test_initialize_write"
60 "test_read_explicit"
61 "test_s3_handles_querystring"
62 "test_s3_uri_contains_question_mark"
63 "test_webhdfs"
64 "test_write"
65 ];
66
67 pythonImportsCheck = [ "smart_open" ];
68
69 meta = with lib; {
70 description = "Library for efficient streaming of very large file";
71 homepage = "https://github.com/RaRe-Technologies/smart_open";
72 license = licenses.mit;
73 maintainers = with maintainers; [ jyp ];
74 };
75}