depot/third_party/nixpkgs/pkgs/development/python-modules/internetarchive/default.nix
Default email 8a45d4525b Project import generated by Copybara.
GitOrigin-RevId: 710fed5a2483f945b14f4a58af2cd3676b42d8c8
2022-03-30 11:31:56 +02:00

60 lines
1.1 KiB
Nix

{ buildPythonPackage
, fetchPypi
, pytest
, tqdm
, pyyaml
, docopt
, requests
, jsonpatch
, args
, schema
, responses
, lib
, glibcLocales
, setuptools
, urllib3
, pythonOlder
}:
buildPythonPackage rec {
pname = "internetarchive";
version = "3.0.0";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
sha256 = "sha256-fRcqsT8p/tqXUpU2/9lAEF1IT8Cy5KK0+jKaeVwZshI=";
};
propagatedBuildInputs = [
tqdm
pyyaml
docopt
requests
jsonpatch
args
schema
setuptools
urllib3
];
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 ];
};
}