about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pypdf2
diff options
context:
space:
mode:
authorChris Ostrouchov <chris.ostrouchov@gmail.com>2018-10-26 11:21:50 -0400
committerFrederik Rietdijk <fridh@fridh.nl>2018-10-27 09:07:22 +0200
commit294ee4ccfdfe145406ca85c88c9451d2a50bb6e0 (patch)
treee71c42d23c5a8e8b26b07dd98a802ce89a97a99e /pkgs/development/python-modules/pypdf2
parent49ccf246261e19b3203ab6525530c98f3ce206d5 (diff)
pythonPackages.pypdf2: refactor move to python-modules
Diffstat (limited to 'pkgs/development/python-modules/pypdf2')
-rw-r--r--pkgs/development/python-modules/pypdf2/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/pypdf2/default.nix b/pkgs/development/python-modules/pypdf2/default.nix
new file mode 100644
index 0000000000000..1c3b908396ec4
--- /dev/null
+++ b/pkgs/development/python-modules/pypdf2/default.nix
@@ -0,0 +1,35 @@
+{ stdenv
+, buildPythonPackage
+, fetchPypi
+, glibcLocales
+, python
+, isPy3k
+}:
+
+buildPythonPackage rec {
+  pname = "PyPDF2";
+  version = "1.26.0";
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2";
+  };
+
+  LC_ALL = "en_US.UTF-8";
+  buildInputs = [ glibcLocales ];
+
+  checkPhase = ''
+    ${python.interpreter} -m unittest discover -s Tests
+  '';
+
+  # Tests broken on Python 3.x
+  doCheck = !(isPy3k);
+
+  meta = with stdenv.lib; {
+    description = "A Pure-Python library built as a PDF toolkit";
+    homepage = "http://mstamy2.github.com/PyPDF2/";
+    license = licenses.bsd3;
+    maintainers = with maintainers; [ desiderius vrthra ];
+  };
+
+}