2020-05-15 21:57:56 +00:00
|
|
|
{ buildPythonPackage
|
2020-10-11 12:50:04 +00:00
|
|
|
, fetchPypi
|
2020-05-15 21:57:56 +00:00
|
|
|
, pytest
|
|
|
|
, six
|
|
|
|
, tqdm
|
|
|
|
, pyyaml
|
|
|
|
, docopt
|
|
|
|
, requests
|
|
|
|
, jsonpatch
|
|
|
|
, args
|
|
|
|
, schema
|
|
|
|
, responses
|
|
|
|
, backports_csv
|
|
|
|
, isPy3k
|
|
|
|
, lib
|
|
|
|
, glibcLocales
|
|
|
|
, setuptools
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "internetarchive";
|
2020-10-11 12:50:04 +00:00
|
|
|
version = "1.9.5";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "759053685c75e6e969d690043b82643c4016500abcbbc44e4daf52ec097a9a15";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
2020-05-15 21:57:56 +00:00
|
|
|
tqdm
|
2020-04-24 23:36:52 +00:00
|
|
|
pyyaml
|
|
|
|
docopt
|
|
|
|
requests
|
|
|
|
jsonpatch
|
|
|
|
args
|
|
|
|
schema
|
|
|
|
setuptools
|
2020-05-15 21:57:56 +00:00
|
|
|
] ++ lib.optionals (!isPy3k) [ backports_csv ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkInputs = [ pytest responses glibcLocales ];
|
|
|
|
|
|
|
|
# tests depend on network
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
checkPhase = ''
|
|
|
|
LC_ALL=en_US.utf-8 pytest tests
|
|
|
|
'';
|
|
|
|
|
2020-10-11 12:50:04 +00:00
|
|
|
pythonImportsCheck = [ "internetarchive" ];
|
|
|
|
|
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";
|
|
|
|
license = licenses.agpl3;
|
2020-05-15 21:57:56 +00:00
|
|
|
maintainers = [ maintainers.marsam ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|