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

43 lines
985 B
Nix
Raw Normal View History

2018-11-18 01:22:38 +00:00
{ buildPythonPackage, fetchFromGitHub, pytest, six, clint, pyyaml, docopt
, requests, jsonpatch, args, schema, responses, backports_csv, isPy3k
, lib, glibcLocales }:
2017-09-16 22:41:09 +00:00
buildPythonPackage rec {
pname = "internetarchive";
2018-11-18 01:22:38 +00:00
version = "1.8.1";
2017-09-16 22:41:09 +00:00
# Can't use pypi, data files for tests missing
src = fetchFromGitHub {
owner = "jjjake";
repo = "internetarchive";
rev = "v${version}";
2018-11-18 01:22:38 +00:00
sha256 = "1fdb0kr9hzgyh0l8d02khcjpsgyd63nbablhc49ncdsav3dhhr3f";
2017-09-16 22:41:09 +00:00
};
2018-11-18 01:22:38 +00:00
propagatedBuildInputs = [
six
clint
pyyaml
docopt
requests
jsonpatch
args
schema
] ++ lib.optional (!isPy3k) backports_csv;
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
checkInputs = [ pytest responses glibcLocales ];
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
# tests depend on network
doCheck = false;
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
checkPhase = ''
LC_ALL=en_US.utf-8 pytest tests
'';
2017-09-16 22:41:09 +00:00
2018-11-18 01:22:38 +00:00
meta = with lib; {
description = "A python wrapper for the various Internet Archive APIs";
2017-09-16 22:41:09 +00:00
homepage = https://github.com/jjjake/internetarchive;
license = licenses.agpl3;
};
}