3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/internetarchive/default.nix

60 lines
1.1 KiB
Nix
Raw Normal View History

{ buildPythonPackage
, fetchPypi
, pytest
, six
, tqdm
, pyyaml
, docopt
, requests
, jsonpatch
, args
, schema
, responses
, backports_csv
, isPy3k
, lib
, glibcLocales
, setuptools
}:
2017-09-16 23:41:09 +01:00
buildPythonPackage rec {
pname = "internetarchive";
version = "2.0.2";
src = fetchPypi {
inherit pname version;
sha256 = "515e6646a2b917c15f2241670d21f14a014b9c67dc509aef4d4aca5a59cdda65";
2017-09-16 23:41:09 +01:00
};
2018-11-18 01:22:38 +00:00
propagatedBuildInputs = [
six
tqdm
2018-11-18 01:22:38 +00:00
pyyaml
docopt
requests
jsonpatch
args
schema
setuptools
] ++ lib.optionals (!isPy3k) [ backports_csv ];
2017-09-16 23:41:09 +01:00
2018-11-18 01:22:38 +00:00
checkInputs = [ pytest responses glibcLocales ];
2017-09-16 23:41:09 +01:00
2018-11-18 01:22:38 +00:00
# tests depend on network
doCheck = false;
2017-09-16 23:41:09 +01:00
2018-11-18 01:22:38 +00:00
checkPhase = ''
LC_ALL=en_US.utf-8 pytest tests
'';
2017-09-16 23:41:09 +01:00
pythonImportsCheck = [ "internetarchive" ];
2018-11-18 01:22:38 +00:00
meta = with lib; {
description = "A Python and Command-Line Interface to Archive.org";
homepage = "https://github.com/jjjake/internetarchive";
changelog = "https://github.com/jjjake/internetarchive/raw/v${version}/HISTORY.rst";
license = licenses.agpl3Plus;
maintainers = [ maintainers.marsam ];
2017-09-16 23:41:09 +01:00
};
}