depot/third_party/nixpkgs/pkgs/development/python-modules/internetarchive/default.nix
Default email ce641f4048 Project import generated by Copybara.
GitOrigin-RevId: bc5d68306b40b8522ffb69ba6cff91898c2fbbff
2021-12-06 17:07:01 +01:00

61 lines
1.1 KiB
Nix

{ buildPythonPackage
, fetchPypi
, pytest
, six
, tqdm
, pyyaml
, docopt
, requests
, jsonpatch
, args
, schema
, responses
, backports_csv
, isPy3k
, lib
, glibcLocales
, setuptools
, urllib3
}:
buildPythonPackage rec {
pname = "internetarchive";
version = "2.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "ebd11ecd038c71e75a3aef8d87750b46480169ecaefb23074c4ae48440bf2836";
};
propagatedBuildInputs = [
six
tqdm
pyyaml
docopt
requests
jsonpatch
args
schema
setuptools
urllib3
] ++ lib.optionals (!isPy3k) [ backports_csv ];
checkInputs = [ pytest responses glibcLocales ];
# tests depend on network
doCheck = false;
checkPhase = ''
LC_ALL=en_US.utf-8 pytest tests
'';
pythonImportsCheck = [ "internetarchive" ];
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 ];
};
}