Merge pull request #29484 from disassembler/internetarchive

internetarchive: 0.8.3 -> 1.7.2
This commit is contained in:
Frederik Rietdijk 2017-09-17 09:25:47 +02:00 committed by GitHub
commit 43b6116d7f
4 changed files with 95 additions and 21 deletions

View File

@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi, future }:
buildPythonPackage rec {
pname = "backports.csv";
version = "1.0.5";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1imzbrradkfn8s2m1qcimyn74dn1mz2p3j381jljn166rf2i6hlc";
};
propogatedBuildInputs = [ future ];
meta = with stdenv.lib; {
description = "Backport of Python 3 csv module";
homepage = https://github.com/ryanhiebert;
license = licenses.psfl;
};
}

View File

@ -0,0 +1,48 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest, six, clint, pyyaml, docopt
, requests, jsonpatch, args, schema, responses, backports_csv }:
buildPythonPackage rec {
pname = "internetarchive";
version = "1.7.2";
name = "${pname}-${version}";
# Can't use pypi, data files for tests missing
src = fetchFromGitHub {
owner = "jjjake";
repo = "internetarchive";
rev = "v${version}";
sha256 = "1cijagy22qi8ydrvizqmi1whnc3qr94yk0910lwgpxjywcygggir";
};
# It is hardcoded to specific versions, I don't know why.
preConfigure = ''
sed "s/schema>=.*/schema>=0.4.0',/" -i setup.py
sed "/backports.csv/d" -i setup.py
'';
#phases = [ "unpackPhase" "configurePhase" "installPhase" "fixupPhase" "installCheckPhase" ];
buildInputs = [ pytest responses ];
propagatedBuildInputs = [
six
clint
pyyaml
docopt
requests
jsonpatch
args
schema
backports_csv
];
# Tests disabled because ia binary doesn't exist when tests run
doCheck = false;
checkPhase = "pytest tests";
meta = with stdenv.lib; {
description = "A python wrapper for the various Internet Archive APIs";
homepage = https://github.com/jjjake/internetarchive;
license = licenses.agpl3;
};
}

View File

@ -0,0 +1,21 @@
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
buildPythonPackage rec {
pname = "schema";
version = "0.6.6";
name = "${pname}-${version}";
src = fetchPypi {
inherit pname version;
sha256 = "1lw28j9w9vxyigg7vkfkvi6ic9lgjkdnfvnxdr7pklslqvzmk2vm";
};
checkInputs = [ pytest ];
meta = with stdenv.lib; {
description = "Library for validating Python data structures";
homepage = https://github.com/keleshev/schema;
license = licenses.mit;
};
}

View File

@ -133,6 +133,8 @@ in {
# packages defined elsewhere
backports_csv = callPackage ../development/python-modules/backports_csv {};
bap = callPackage ../development/python-modules/bap {
bap = pkgs.ocamlPackages_4_02.bap;
};
@ -6378,27 +6380,7 @@ in {
};
};
internetarchive = let ver = "0.8.3"; in buildPythonPackage rec {
name = "internetarchive-${ver}";
src = pkgs.fetchurl {
url = "https://github.com/jjjake/internetarchive/archive/v${ver}.tar.gz";
sha256 = "0j3l13zvbx50j66l6pnf8y8y8m6gk1sc3yssvfd2scvmv4gnmm8n";
};
# It is hardcoded to specific versions, I don't know why.
preConfigure = ''
sed 's/==/>=/' -i setup.py
'';
buildInputs = with self; [ pytest ];
propagatedBuildInputs = with self; [ six clint pyyaml docopt requests jsonpatch args ];
meta = with stdenv.lib; {
description = "A python wrapper for the various Internet Archive APIs";
homepage = "https://github.com/jjjake/internetarchive";
};
};
internetarchive = callPackage ../development/python-modules/internetarchive {};
jsbeautifier = callPackage ../development/python-modules/jsbeautifier {};
@ -8005,6 +7987,8 @@ in {
};
};
schema = callPackage ../development/python-modules/schema {};
svg-path = buildPythonPackage rec {
name = "svg.path-${version}";
version = "2.0b1";