Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / smart-open / default.nix
blobdf0cbdc8a01c6ccc8a9fed314c651d7a5cb59f93
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 , paramiko
13 , pytestCheckHook
14 , responses
17 buildPythonPackage rec {
18   pname = "smart-open";
19   version = "6.4.0";
20   format = "setuptools";
22   disabled = pythonOlder "3.6";
24   src = fetchFromGitHub {
25     owner = "RaRe-Technologies";
26     repo = "smart_open";
27     rev = "refs/tags/v${version}";
28     hash = "sha256-fciNaVw603FAcgrSrND+LEycJffmnFQij2ZpatYZ/e4=";
29   };
31   passthru.optional-dependencies = {
32     s3 = [
33       boto3
34     ];
35     gcs = [
36       google-cloud-storage
37     ];
38     azure = [
39       azure-storage-blob
40       azure-common
41       azure-core
42     ];
43     http = [
44       requests
45     ];
46     webhdfs = [
47       requests
48     ];
49     ssh = [
50       paramiko
51     ];
52   };
54   pythonImportsCheck = [
55     "smart_open"
56   ];
58   nativeCheckInputs = [
59     moto
60     pytestCheckHook
61     responses
62   ] ++ lib.flatten (builtins.attrValues passthru.optional-dependencies);
64   pytestFlagsArray = [
65     "smart_open"
66   ];
68   disabledTests = [
69     # https://github.com/RaRe-Technologies/smart_open/issues/784
70     "test_https_seek_forward"
71     "test_seek_from_current"
72     "test_seek_from_end"
73     "test_seek_from_start"
74   ];
76   meta = with lib; {
77     description = "Library for efficient streaming of very large file";
78     homepage = "https://github.com/RaRe-Technologies/smart_open";
79     license = licenses.mit;
80     maintainers = with maintainers; [ jyp ];
81   };