2023-05-24 13:37:59 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2020-05-15 21:57:56 +00:00
|
|
|
, docopt
|
2023-05-24 13:37:59 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2020-05-15 21:57:56 +00:00
|
|
|
, requests
|
|
|
|
, jsonpatch
|
|
|
|
, schema
|
|
|
|
, responses
|
|
|
|
, setuptools
|
2023-05-24 13:37:59 +00:00
|
|
|
, tqdm
|
2021-12-06 16:07:01 +00:00
|
|
|
, urllib3
|
2022-03-30 09:31:56 +00:00
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, importlib-metadata
|
2020-05-15 21:57:56 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "internetarchive";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "4.1.0";
|
2024-04-21 15:54:59 +00:00
|
|
|
pyproject = true;
|
2023-01-11 07:51:40 +00:00
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2022-03-30 09:31:56 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "jjjake";
|
|
|
|
repo = "internetarchive";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-CqfwAKhrq4VEBU258x19JT8+ay2vOYIzVoFWjAzh3wY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2020-05-15 21:57:56 +00:00
|
|
|
tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
docopt
|
|
|
|
requests
|
|
|
|
jsonpatch
|
|
|
|
schema
|
2021-12-06 16:07:01 +00:00
|
|
|
urllib3
|
2024-04-21 15:54:59 +00:00
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
importlib-metadata
|
2022-03-30 09:31:56 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
responses
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Tests require network access
|
|
|
|
"test_get_item_with_kwargs"
|
|
|
|
"test_upload"
|
|
|
|
"test_upload_metadata"
|
|
|
|
"test_upload_queue_derive"
|
|
|
|
"test_upload_validate_identifie"
|
|
|
|
"test_upload_validate_identifier"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
disabledTestPaths = [
|
|
|
|
# Tests require network access
|
|
|
|
"tests/cli/test_ia.py"
|
|
|
|
"tests/cli/test_ia_download.py"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"internetarchive"
|
|
|
|
];
|
2020-10-11 12:50:04 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2020-05-15 21:57:56 +00:00
|
|
|
description = "A Python and Command-Line Interface to Archive.org";
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/jjjake/internetarchive";
|
2024-04-21 15:54:59 +00:00
|
|
|
changelog = "https://github.com/jjjake/internetarchive/blob/v${version}/HISTORY.rst";
|
2021-04-08 16:26:57 +00:00
|
|
|
license = licenses.agpl3Plus;
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = [ ];
|
2022-06-16 17:23:12 +00:00
|
|
|
mainProgram = "ia";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|