Patchwork [2/3] gnu: Add python-pypdf.

login
register
mail settings
Submitter Hartmut Goebel
Date Nov. 8, 2016, 9:37 p.m.
Message ID <1478641022-30723-2-git-send-email-h.goebel@crazy-compilers.com>
Download mbox | patch
Permalink /patch/17319/
State New
Headers show

Comments

Hartmut Goebel - Nov. 8, 2016, 9:37 p.m.
* gnu/packages/pdf.scm(python2-pypdf): New variable.
---
 gnu/packages/pdf.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
Leo Famulari - Nov. 8, 2016, 11:57 p.m.
On Tue, Nov 08, 2016 at 10:37:01PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(python2-pypdf): New variable.

Same feedback as for python-pypdf2...

> +    (home-page "http://mstamy2.github.com/PyPDF2")

Also, does it have its own home-page?
Efraim Flashner - Nov. 9, 2016, 7:19 a.m.
On Tue, Nov 08, 2016 at 10:37:01PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(python2-pypdf): New variable.
> ---
> +              (uri (string-append "https://pypi.python.org/packages/source/p"
> +                                  "/pyPdf/pyPdf-" version ".tar.gz"))
                                            ^^^^^^^
One of the things I've picked up is that this will work with the pypi
importer if you feed it "pyPdf"
Hartmut Goebel - Nov. 9, 2016, 10:04 p.m.
Am 09.11.2016 um 00:57 schrieb Leo Famulari:
>> > +    (home-page "http://mstamy2.github.com/PyPDF2")
> Also, does it have its own home-page?

Well spotted :-)
Hartmut Goebel - Nov. 9, 2016, 10:10 p.m.
Am 09.11.2016 um 08:19 schrieb Efraim Flashner:
> One of the things I've picked up is that this will work with the pypi
> importer if you feed it "pyPdf"

Fixed. I tries some combinations but obviously missed the obvious one :-)

Patch

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index 558ea89..ca3f830 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -821,3 +821,37 @@  is therefore a useful tool for websites that manage or manipulate PDFs.")
 
 (define-public python2-pypdf2
   (package-with-python2 python-pypdf2))
+
+(define-public python2-pypdf
+  (package
+    (name "python2-pypdf")
+    (version "1.13")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://pypi.python.org/packages/source/p"
+                                  "/pyPdf/pyPdf-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; no tests
+       #:python ,python-2))
+    (home-page "http://mstamy2.github.com/PyPDF2")
+    (synopsis "Pure-Python PDF toolkit")
+    (description "A Pure-Python library built as a PDF toolkit.  It is capable
+of:
+
+@itemize
+@item extracting document information (title, author, …)
+@item splitting documents page by page
+@item merging documents page by page
+@item cropping pages
+@item merging multiple pages into a single page
+@item encrypting and decrypting PDF files
+@item and more!
+@end itemize
+
+Note: This module isn't maintained anymore.  For new projects please use
+python-pypdf2 instead.")
+    (license license:bsd-3)))