nixpkgs/pkgs/development/python-modules/internetarchive/default.nix

59 lines
1017 B
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 15:41:09 -07:00
buildPythonPackage rec {
pname = "internetarchive";
version = "1.9.6";
src = fetchPypi {
inherit pname version;
sha256 = "0e9b24577086283280a5089b3e65086640b4e42d61ca4af913639f45b02b9e4c";
2017-09-16 15:41:09 -07:00
};
2018-11-17 17:22:38 -08:00
propagatedBuildInputs = [
six
tqdm
2018-11-17 17:22:38 -08:00
pyyaml
docopt
requests
jsonpatch
args
schema
setuptools
] ++ lib.optionals (!isPy3k) [ backports_csv ];
2017-09-16 15:41:09 -07:00
2018-11-17 17:22:38 -08:00
checkInputs = [ pytest responses glibcLocales ];
2017-09-16 15:41:09 -07:00
2018-11-17 17:22:38 -08:00
# tests depend on network
doCheck = false;
2017-09-16 15:41:09 -07:00
2018-11-17 17:22:38 -08:00
checkPhase = ''
LC_ALL=en_US.utf-8 pytest tests
'';
2017-09-16 15:41:09 -07:00
pythonImportsCheck = [ "internetarchive" ];
2018-11-17 17:22:38 -08:00
meta = with lib; {
description = "A Python and Command-Line Interface to Archive.org";
homepage = "https://github.com/jjjake/internetarchive";
2017-09-16 15:41:09 -07:00
license = licenses.agpl3;
maintainers = [ maintainers.marsam ];
2017-09-16 15:41:09 -07:00
};
}