2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-09-25 04:45:31 +00:00
|
|
|
, pythonOlder
|
2021-07-21 07:28:18 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, azure-common
|
|
|
|
, azure-core
|
|
|
|
, azure-storage-blob
|
2020-04-24 23:36:52 +00:00
|
|
|
, boto3
|
2021-07-21 07:28:18 +00:00
|
|
|
, google-cloud-storage
|
2020-04-24 23:36:52 +00:00
|
|
|
, requests
|
2021-07-21 07:28:18 +00:00
|
|
|
, moto
|
2022-09-30 11:47:45 +00:00
|
|
|
, paramiko
|
2021-07-21 07:28:18 +00:00
|
|
|
, pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
, responses
|
2024-04-21 15:54:59 +00:00
|
|
|
, setuptools
|
|
|
|
, wrapt
|
|
|
|
, zstandard
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-05-28 09:39:13 +00:00
|
|
|
pname = "smart-open";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "7.0.4";
|
|
|
|
pyproject = true;
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "RaRe-Technologies";
|
|
|
|
repo = "smart_open";
|
2022-12-17 10:02:37 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-4HOTaF6AKXGlVCvSGKnnaH73aa4IO0aRxz03XQ4gSd8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
build-system = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
|
|
|
dependencies = [
|
|
|
|
wrapt
|
|
|
|
];
|
|
|
|
|
|
|
|
optional-dependencies = {
|
2023-11-16 04:20:00 +00:00
|
|
|
s3 = [
|
|
|
|
boto3
|
|
|
|
];
|
|
|
|
gcs = [
|
|
|
|
google-cloud-storage
|
|
|
|
];
|
|
|
|
azure = [
|
|
|
|
azure-storage-blob
|
|
|
|
azure-common
|
|
|
|
azure-core
|
|
|
|
];
|
|
|
|
http = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
webhdfs = [
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
ssh = [
|
|
|
|
paramiko
|
|
|
|
];
|
2024-04-21 15:54:59 +00:00
|
|
|
zst = [
|
|
|
|
zstandard
|
|
|
|
];
|
2023-11-16 04:20:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"smart_open"
|
2021-07-21 07:28:18 +00:00
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-07-21 07:28:18 +00:00
|
|
|
moto
|
|
|
|
pytestCheckHook
|
2023-11-16 04:20:00 +00:00
|
|
|
responses
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.flatten (builtins.attrValues optional-dependencies);
|
2021-07-21 07:28:18 +00:00
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"smart_open"
|
2021-07-21 07:28:18 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
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"
|
2021-07-21 07:28:18 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
meta = with lib; {
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/piskvorky/smart_open/releases/tag/v${version}";
|
2021-05-28 09:39:13 +00:00
|
|
|
description = "Library for efficient streaming of very large file";
|
2021-07-21 07:28:18 +00:00
|
|
|
homepage = "https://github.com/RaRe-Technologies/smart_open";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ jyp ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|