summary refs log tree commit diff
path: root/pkgs/development/python-modules/internetarchive
diff options
context:
space:
mode:
authorSamuel Leathers <sam@appliedtrust.com>2017-09-16 18:41:09 -0400
committerSamuel Leathers <sam@appliedtrust.com>2017-09-16 19:24:29 -0400
commit80625b6012637544a1a11567b13c8361d4bb9266 (patch)
tree286b8247f1fc979c51ec472890118d46c951f38d /pkgs/development/python-modules/internetarchive
parentd8848c0202e06b23953754446d900fd021fd6080 (diff)
downloadnixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar.gz
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar.bz2
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar.lz
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar.xz
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.tar.zst
nixlib-80625b6012637544a1a11567b13c8361d4bb9266.zip
internetarchive: 0.8.3 -> 1.7.2
Diffstat (limited to 'pkgs/development/python-modules/internetarchive')
-rw-r--r--pkgs/development/python-modules/internetarchive/default.nix48
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/internetarchive/default.nix b/pkgs/development/python-modules/internetarchive/default.nix
new file mode 100644
index 000000000000..ff077bd1b01e
--- /dev/null
+++ b/pkgs/development/python-modules/internetarchive/default.nix
@@ -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;
+  };
+}