4bac34ead1
GitOrigin-RevId: 724bfc0892363087709bd3a5a1666296759154b1
79 lines
1.5 KiB
Nix
79 lines
1.5 KiB
Nix
{ lib
|
|
, arrow
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, importlib-metadata
|
|
, logfury
|
|
, pyfakefs
|
|
, pytestCheckHook
|
|
, pytest-lazy-fixture
|
|
, pytest-mock
|
|
, pythonOlder
|
|
, requests
|
|
, setuptools-scm
|
|
, tqdm
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "b2sdk";
|
|
version = "1.19.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-aJpSt+dXjw4S33dBiMkaR6wxzwLru+jseuPKFj2R36Y=";
|
|
};
|
|
|
|
nativeBuildInputs = [
|
|
setuptools-scm
|
|
];
|
|
|
|
propagatedBuildInputs = [
|
|
arrow
|
|
logfury
|
|
requests
|
|
tqdm
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
importlib-metadata
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
pytestCheckHook
|
|
pytest-lazy-fixture
|
|
pytest-mock
|
|
pyfakefs
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace setup.py \
|
|
--replace 'setuptools_scm<6.0' 'setuptools_scm'
|
|
substituteInPlace requirements.txt \
|
|
--replace 'arrow>=0.8.0,<1.0.0' 'arrow'
|
|
'';
|
|
|
|
disabledTestPaths = [
|
|
# requires aws s3 auth
|
|
"test/integration/test_download.py"
|
|
"test/integration/test_upload.py"
|
|
];
|
|
|
|
disabledTests = [
|
|
# Test requires an API key
|
|
"test_raw_api"
|
|
"test_files_headers"
|
|
"test_large_file"
|
|
];
|
|
|
|
pythonImportsCheck = [
|
|
"b2sdk"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Client library and utilities for access to B2 Cloud Storage (backblaze)";
|
|
homepage = "https://github.com/Backblaze/b2-sdk-python";
|
|
license = licenses.mit;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|