all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 1/3] gnu: Add python-pypdf2.
@ 2016-11-08 21:37 Hartmut Goebel
  2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
                   ` (3 more replies)
  0 siblings, 4 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-08 21:37 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(python-pypdf2, python2-pypdf2): New variables.
---
 gnu/packages/pdf.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ee33e3c..558ea89 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -784,3 +784,40 @@ the framebuffer.")
     (description "@command{pdf2svg} is a simple command-line PDF to SVG
 converter using the Poppler and Cairo libraries.")
     (license license:gpl2+)))
+
+(define-public python-pypdf2
+  (package
+    (name "python-pypdf2")
+    (version "1.26.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "PyPDF2" version))
+              (sha256
+               (base32
+                "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
+    (build-system python-build-system)
+    (arguments
+      '(#:tests? #f))  ; no tests
+    (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
+
+By being Pure-Python, it should run on any Python platform without any
+dependencies on external libraries.  It can also work entirely on StringIO
+objects rather than file streams, allowing for PDF manipulation in memory.  It
+is therefore a useful tool for websites that manage or manipulate PDFs.")
+    (license license:bsd-3)))
+
+(define-public python2-pypdf2
+  (package-with-python2 python-pypdf2))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 2/3] gnu: Add python-pypdf.
  2016-11-08 21:37 [PATCH 1/3] gnu: Add python-pypdf2 Hartmut Goebel
@ 2016-11-08 21:37 ` Hartmut Goebel
  2016-11-08 23:57   ` Leo Famulari
  2016-11-09  7:19   ` Efraim Flashner
  2016-11-08 21:37 ` [PATCH 3/3] gnu: Add pdfposter Hartmut Goebel
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-08 21:37 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(python2-pypdf): New variable.
---
 gnu/packages/pdf.scm | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

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)))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH 3/3] gnu: Add pdfposter.
  2016-11-08 21:37 [PATCH 1/3] gnu: Add python-pypdf2 Hartmut Goebel
  2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
@ 2016-11-08 21:37 ` Hartmut Goebel
  2016-11-09  0:02   ` Leo Famulari
  2016-11-08 23:55 ` [PATCH 1/3] gnu: Add python-pypdf2 Leo Famulari
  2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
  3 siblings, 1 reply; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-08 21:37 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(pdfposter): New variable.
---
 gnu/packages/pdf.scm | 35 +++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ca3f830..eed37d6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -855,3 +855,38 @@ of:
 Note: This module isn't maintained anymore.  For new projects please use
 python-pypdf2 instead.")
     (license license:bsd-3)))
+
+(define-public pdfposter
+  (package
+    (name "pdfposter")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://pypi.python.org/packages/source/p"
+                                  "/pdftools.pdfposter/"
+                                  "pdftools.pdfposter-" version ".tar.bz2"))
+              ;(uri (pypi-uri "pdftools.pdfposter" version))
+              (sha256
+               (base32
+                "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; no tests
+       #:python ,python-2))
+    (inputs
+     ;; pdfposter 0.6.0 still uses the old pyPdf
+     `(("python2-pypdf" ,python2-pypdf)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (home-page "https://pythonhosted.org/pdftools.pdfposter/")
+    (synopsis "Scale and tile PDF images/pages to print on multiple pages")
+    (description " @command{pdfposter} can be used to create a large poster by
+building it from multple pages and/or printing it on large media.  It expects
+as input a PDF file, normally printing on a single page.  The output is again
+a PDF file, maybe containing multiple pages together building the poster.  The
+input page will be scaled to obtain the desired size.
+
+This is much like @command{poster} does for Postscript files, but working with
+PDF. Since sometimes @command{poster} does not like your files converted from
+PDF. :-) Indeed @command{pdfposter} was inspired by @command{poster}.")
+    (license license:gpl3+)))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] gnu: Add python-pypdf2.
  2016-11-08 21:37 [PATCH 1/3] gnu: Add python-pypdf2 Hartmut Goebel
  2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
  2016-11-08 21:37 ` [PATCH 3/3] gnu: Add pdfposter Hartmut Goebel
@ 2016-11-08 23:55 ` Leo Famulari
  2016-11-09 21:59   ` Hartmut Goebel
  2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
  3 siblings, 1 reply; 22+ messages in thread
From: Leo Famulari @ 2016-11-08 23:55 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Tue, Nov 08, 2016 at 10:37:00PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(python-pypdf2, python2-pypdf2): New variables.

> +    (arguments
> +      '(#:tests? #f))  ; no tests

Are these files not relevant?

https://github.com/mstamy2/PyPDF2/tree/master/Tests

> +    (home-page "http://mstamy2.github.com/PyPDF2")
> +    (synopsis "Pure-Python PDF toolkit")

I would replace the hyphen in "Pure-Python" with a space.

> +    (description "A Pure-Python library built as a PDF toolkit.  It is capable

Same here.

> +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

We have to use enumerate instead of itemize due to a limitation in
Guile's texinfo -> HTML converter. This is fixed in Guile, but not in
the version that we use currently, IIUC:

https://debbugs.gnu.org/cgi/bugreport.cgi?bug=21772
https://lists.gnu.org/archive/html/guile-commits/2016-06/msg00341.html

$ git describe --contains bd65845497110b179456d4bfdf26854791f0a822
v2.1.4~95

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] gnu: Add python-pypdf.
  2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
@ 2016-11-08 23:57   ` Leo Famulari
  2016-11-09 22:04     ` Hartmut Goebel
  2016-11-09  7:19   ` Efraim Flashner
  1 sibling, 1 reply; 22+ messages in thread
From: Leo Famulari @ 2016-11-08 23:57 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

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?

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 3/3] gnu: Add pdfposter.
  2016-11-08 21:37 ` [PATCH 3/3] gnu: Add pdfposter Hartmut Goebel
@ 2016-11-09  0:02   ` Leo Famulari
  2016-11-09 22:19     ` Hartmut Goebel
  0 siblings, 1 reply; 22+ messages in thread
From: Leo Famulari @ 2016-11-09  0:02 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

On Tue, Nov 08, 2016 at 10:37:02PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(pdfposter): New variable.

I see you are the author of this software :)

https://gitlab.com/pdftools/pdfposter/blob/develop/README.txt#L11

> +              (uri (string-append "https://pypi.python.org/packages/source/p"
> +                                  "/pdftools.pdfposter/"
> +                                  "pdftools.pdfposter-" version ".tar.bz2"))
> +              ;(uri (pypi-uri "pdftools.pdfposter" version))

Can we use pypi-uri? It takes an optional extension argument that might
be required in this case.

> +    (arguments
> +     `(#:tests? #f  ; no tests

How about these files:

https://gitlab.com/pdftools/pdfposter/tree/develop/test

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] gnu: Add python-pypdf.
  2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
  2016-11-08 23:57   ` Leo Famulari
@ 2016-11-09  7:19   ` Efraim Flashner
  2016-11-09 22:10     ` Hartmut Goebel
  1 sibling, 1 reply; 22+ messages in thread
From: Efraim Flashner @ 2016-11-09  7:19 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 656 bytes --]

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"


-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 1/3] gnu: Add python-pypdf2.
  2016-11-08 23:55 ` [PATCH 1/3] gnu: Add python-pypdf2 Leo Famulari
@ 2016-11-09 21:59   ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 21:59 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Am 09.11.2016 um 00:55 schrieb Leo Famulari:
>> +      '(#:tests? #f))  ; no tests
> Are these files not relevant?
> https://github.com/mstamy2/PyPDF2/tree/master/Tests

Ubs, I missed them. This is negligible and fails in Python 3.
nevertheless I added them.

> I would replace the hyphen in "Pure-Python" with a space.
> We have to use enumerate instead of itemize due to a limitation in

Done. I'll send updates patches since again it's late at night :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] gnu: Add python-pypdf.
  2016-11-08 23:57   ` Leo Famulari
@ 2016-11-09 22:04     ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:04 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

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 :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |


[-- Attachment #2: Type: text/html, Size: 1150 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 2/3] gnu: Add python-pypdf.
  2016-11-09  7:19   ` Efraim Flashner
@ 2016-11-09 22:10     ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:10 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

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 :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH 3/3] gnu: Add pdfposter.
  2016-11-09  0:02   ` Leo Famulari
@ 2016-11-09 22:19     ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:19 UTC (permalink / raw)
  To: Leo Famulari; +Cc: guix-devel

Am 09.11.2016 um 01:02 schrieb Leo Famulari:
> I see you are the author of this software :)
:-)
> Can we use pypi-uri? It takes an optional extension argument that might
> be required in this case.

This did the trick. Thanks.

> How about these files:
> https://gitlab.com/pdftools/pdfposter/tree/develop/test

These are only for visual control, not a test-suite.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* [Patch v2 1/3] gnu: Add python-pypdf2.
  2016-11-08 21:37 [PATCH 1/3] gnu: Add python-pypdf2 Hartmut Goebel
                   ` (2 preceding siblings ...)
  2016-11-08 23:55 ` [PATCH 1/3] gnu: Add python-pypdf2 Leo Famulari
@ 2016-11-09 22:39 ` Hartmut Goebel
  2016-11-09 22:39   ` [Patch v2 2/3] gnu: Add python-pypdf Hartmut Goebel
                     ` (2 more replies)
  3 siblings, 3 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:39 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(python-pypdf2, python2-pypdf2): New variables.
---
 gnu/packages/pdf.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index ee33e3c..e243006 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -784,3 +784,48 @@ the framebuffer.")
     (description "@command{pdf2svg} is a simple command-line PDF to SVG
 converter using the Poppler and Cairo libraries.")
     (license license:gpl2+)))
+
+(define-public python-pypdf2
+  (package
+    (name "python-pypdf2")
+    (version "1.26.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "PyPDF2" version))
+              (sha256
+               (base32
+                "11a3aqljg4sawjijkvzhs3irpw0y67zivqpbjpm065ha5wpr13z2"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f)) ; tests fail in Python 3 (due to str vs bytes)
+    (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:
+
+@enumerate
+@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 enumerate
+
+By being pure Python, it should run on any Python platform without any
+dependencies on external libraries.  It can also work entirely on StringIO
+objects rather than file streams, allowing for PDF manipulation in memory.  It
+is therefore a useful tool for websites that manage or manipulate PDFs.")
+    (license license:bsd-3)))
+
+(define-public python2-pypdf2
+  (package
+    (inherit (package-with-python2 python-pypdf2))
+    (arguments
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (zero? (system* "python" "-m" "unittest" "Tests.tests")))))))))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Patch v2 2/3] gnu: Add python-pypdf.
  2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
@ 2016-11-09 22:39   ` Hartmut Goebel
  2016-11-10 10:47     ` Ludovic Courtès
  2016-11-09 22:39   ` [Patch v2 3/3] gnu: Add pdfposter Hartmut Goebel
  2016-11-10 10:46   ` [Patch v2 1/3] gnu: Add python-pypdf2 Ludovic Courtès
  2 siblings, 1 reply; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:39 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(python2-pypdf): New variable.
---
 gnu/packages/pdf.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index e243006..e0279c6 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -829,3 +829,25 @@ is therefore a useful tool for websites that manage or manipulate PDFs.")
          (replace 'check
            (lambda _
              (zero? (system* "python" "-m" "unittest" "Tests.tests")))))))))
+
+(define-public python2-pypdf
+  (package
+    (name "python2-pypdf")
+    (version "1.13")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pyPdf" version))
+              (sha256
+               (base32
+                "0fqfvamir7k41w84c73rghzkiv891gdr17q5iz4hgbf6r71y9v9s"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; no tests
+       #:python ,python-2))
+    (home-page "http://pybrary.net/pyPdf/")
+    (synopsis "Pure Python PDF toolkit")
+    (description "A pure Python library built as a PDF toolkit.
+
+Note: This module isn't maintained anymore.  For new projects please use
+python-pypdf2 instead.")
+    (license license:bsd-3)))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [Patch v2 3/3] gnu: Add pdfposter.
  2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
  2016-11-09 22:39   ` [Patch v2 2/3] gnu: Add python-pypdf Hartmut Goebel
@ 2016-11-09 22:39   ` Hartmut Goebel
  2016-11-10  7:51     ` Efraim Flashner
  2016-11-10 10:46   ` [Patch v2 1/3] gnu: Add python-pypdf2 Ludovic Courtès
  2 siblings, 1 reply; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-09 22:39 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/pdf.scm(pdfposter): New variable.
---
 gnu/packages/pdf.scm | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
index e0279c6..06cfab9 100644
--- a/gnu/packages/pdf.scm
+++ b/gnu/packages/pdf.scm
@@ -851,3 +851,35 @@ is therefore a useful tool for websites that manage or manipulate PDFs.")
 Note: This module isn't maintained anymore.  For new projects please use
 python-pypdf2 instead.")
     (license license:bsd-3)))
+
+(define-public pdfposter
+  (package
+    (name "pdfposter")
+    (version "0.6.0")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
+              (sha256
+               (base32
+                "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:tests? #f  ; no test suite, only for visula control
+       #:python ,python-2))
+    (inputs
+     ;; pdfposter 0.6.0 still uses the old pyPdf
+     `(("python2-pypdf" ,python2-pypdf)))
+    (native-inputs
+     `(("python2-setuptools" ,python2-setuptools)))
+    (home-page "https://pythonhosted.org/pdftools.pdfposter/")
+    (synopsis "Scale and tile PDF images/pages to print on multiple pages")
+    (description "@command{pdfposter} can be used to create a large poster by
+building it from multple pages and/or printing it on large media.  It expects
+as input a PDF file, normally printing on a single page.  The output is again
+a PDF file, maybe containing multiple pages together building the poster.  The
+input page will be scaled to obtain the desired size.
+
+This is much like @command{poster} does for Postscript files, but working with
+PDF.  Since sometimes @command{poster} does not like your files converted from
+PDF. :-) Indeed @command{pdfposter} was inspired by @command{poster}.")
+    (license license:gpl3+)))
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [Patch v2 3/3] gnu: Add pdfposter.
  2016-11-09 22:39   ` [Patch v2 3/3] gnu: Add pdfposter Hartmut Goebel
@ 2016-11-10  7:51     ` Efraim Flashner
  2016-11-10 10:48       ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Efraim Flashner @ 2016-11-10  7:51 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 2545 bytes --]

On Wed, Nov 09, 2016 at 11:39:13PM +0100, Hartmut Goebel wrote:
> * gnu/packages/pdf.scm(pdfposter): New variable.
> ---
>  gnu/packages/pdf.scm | 32 ++++++++++++++++++++++++++++++++
>  1 file changed, 32 insertions(+)
> 
> diff --git a/gnu/packages/pdf.scm b/gnu/packages/pdf.scm
> index e0279c6..06cfab9 100644
> --- a/gnu/packages/pdf.scm
> +++ b/gnu/packages/pdf.scm
> @@ -851,3 +851,35 @@ is therefore a useful tool for websites that manage or manipulate PDFs.")
>  Note: This module isn't maintained anymore.  For new projects please use
>  python-pypdf2 instead.")
>      (license license:bsd-3)))
> +
> +(define-public pdfposter
> +  (package
> +    (name "pdfposter")
> +    (version "0.6.0")
> +    (source (origin
> +              (method url-fetch)
> +              (uri (pypi-uri "pdftools.pdfposter" version ".tar.bz2"))
> +              (sha256
> +               (base32
> +                "1i9jqawf279va089ykicglcq4zlsnwgcnsdzaa8vnm836lqhywma"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:tests? #f  ; no test suite, only for visula control
                                                ^^^^^^^
                                            typo


> +       #:python ,python-2))
> +    (inputs
> +     ;; pdfposter 0.6.0 still uses the old pyPdf
> +     `(("python2-pypdf" ,python2-pypdf)))
> +    (native-inputs
> +     `(("python2-setuptools" ,python2-setuptools)))
> +    (home-page "https://pythonhosted.org/pdftools.pdfposter/")
> +    (synopsis "Scale and tile PDF images/pages to print on multiple pages")
> +    (description "@command{pdfposter} can be used to create a large poster by
> +building it from multple pages and/or printing it on large media.  It expects
> +as input a PDF file, normally printing on a single page.  The output is again
> +a PDF file, maybe containing multiple pages together building the poster.  The
> +input page will be scaled to obtain the desired size.
> +
> +This is much like @command{poster} does for Postscript files, but working with
> +PDF.  Since sometimes @command{poster} does not like your files converted from
> +PDF. :-) Indeed @command{pdfposter} was inspired by @command{poster}.")
        ^^^^
I would leave this out

> +    (license license:gpl3+)))
> -- 
> 2.7.4
> 
> 

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 1/3] gnu: Add python-pypdf2.
  2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
  2016-11-09 22:39   ` [Patch v2 2/3] gnu: Add python-pypdf Hartmut Goebel
  2016-11-09 22:39   ` [Patch v2 3/3] gnu: Add pdfposter Hartmut Goebel
@ 2016-11-10 10:46   ` Ludovic Courtès
  2016-11-10 10:58     ` Hartmut Goebel
  2 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2016-11-10 10:46 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * gnu/packages/pdf.scm(python-pypdf2, python2-pypdf2): New variables.
                        ^
Space please.

> +    (arguments
> +     `(#:tests? #f)) ; tests fail in Python 3 (due to str vs bytes)

So probably we should only build the Python 2 variant?  WDYT?

> +@item and more!

I’d remove this line.

> +By being pure Python, it should run on any Python platform without any
> +dependencies on external libraries.  It can also work entirely on StringIO

@code{StringIO}

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 2/3] gnu: Add python-pypdf.
  2016-11-09 22:39   ` [Patch v2 2/3] gnu: Add python-pypdf Hartmut Goebel
@ 2016-11-10 10:47     ` Ludovic Courtès
  0 siblings, 0 replies; 22+ messages in thread
From: Ludovic Courtès @ 2016-11-10 10:47 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> * gnu/packages/pdf.scm(python2-pypdf): New variable.
                        ^
Space.

> +    (synopsis "Pure Python PDF toolkit")
> +    (description "A pure Python library built as a PDF toolkit.

Please turn this into a sentence.

OK with these changes, thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 3/3] gnu: Add pdfposter.
  2016-11-10  7:51     ` Efraim Flashner
@ 2016-11-10 10:48       ` Ludovic Courtès
  2016-11-10 13:28         ` Hartmut Goebel
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2016-11-10 10:48 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

Efraim Flashner <efraim@flashner.co.il> skribis:

> On Wed, Nov 09, 2016 at 11:39:13PM +0100, Hartmut Goebel wrote:
>> * gnu/packages/pdf.scm(pdfposter): New variable.
                         ^
Space.  :-)

[...]

>> +    (arguments
>> +     `(#:tests? #f  ; no test suite, only for visula control
>                                                 ^^^^^^^
>                                             typo

[...]

>> +PDF.  Since sometimes @command{poster} does not like your files converted from
>> +PDF. :-) Indeed @command{pdfposter} was inspired by @command{poster}.")
>         ^^^^
> I would leave this out

I agree with Efraim.

LGTM with these changes.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 1/3] gnu: Add python-pypdf2.
  2016-11-10 10:46   ` [Patch v2 1/3] gnu: Add python-pypdf2 Ludovic Courtès
@ 2016-11-10 10:58     ` Hartmut Goebel
  2016-11-10 12:35       ` Ludovic Courtès
  0 siblings, 1 reply; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-10 10:58 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Am 10.11.2016 um 11:46 schrieb Ludovic Courtès:
>> > +    (arguments
>> > +     `(#:tests? #f)) ; tests fail in Python 3 (due to str vs bytes)
> So probably we should only build the Python 2 variant?  WDYT?
>

The main feature of PyPDF2 is that is supports Python 3, what the old
pyPdf does not. So we need Python 3.

The test suite does not fail in the sense that it shows bugs, but in a
way that shows the test suite was not adopted to work with Python 3. The
test-suite is negligible anyway.  I'll update the comment.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 1/3] gnu: Add python-pypdf2.
  2016-11-10 10:58     ` Hartmut Goebel
@ 2016-11-10 12:35       ` Ludovic Courtès
  2016-11-10 13:10         ` Hartmut Goebel
  0 siblings, 1 reply; 22+ messages in thread
From: Ludovic Courtès @ 2016-11-10 12:35 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> Am 10.11.2016 um 11:46 schrieb Ludovic Courtès:
>>> > +    (arguments
>>> > +     `(#:tests? #f)) ; tests fail in Python 3 (due to str vs bytes)
>> So probably we should only build the Python 2 variant?  WDYT?
>>
>
> The main feature of PyPDF2 is that is supports Python 3, what the old
> pyPdf does not. So we need Python 3.
>
> The test suite does not fail in the sense that it shows bugs, but in a
> way that shows the test suite was not adopted to work with Python 3. The
> test-suite is negligible anyway.  I'll update the comment.

Hmm, OK.  That doesn’t make it sounds like it’s really safe to use with
Python 3.

At the very least, the test suite should be disabled only for the
Python 3 variant IMO, and with a slightly more detailed explanation in
the comment.

Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 1/3] gnu: Add python-pypdf2.
  2016-11-10 12:35       ` Ludovic Courtès
@ 2016-11-10 13:10         ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-10 13:10 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Am 10.11.2016 um 13:35 schrieb Ludovic Courtès:
> Hmm, OK.  That doesn’t make it sounds like it’s really safe to use with
> Python 3.

You challenged me :-)   I fixed the test-suite using a simple change
which opens a file in binary mode.

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [Patch v2 3/3] gnu: Add pdfposter.
  2016-11-10 10:48       ` Ludovic Courtès
@ 2016-11-10 13:28         ` Hartmut Goebel
  0 siblings, 0 replies; 22+ messages in thread
From: Hartmut Goebel @ 2016-11-10 13:28 UTC (permalink / raw)
  To: Ludovic Courtès, Efraim Flashner; +Cc: guix-devel

Am 10.11.2016 um 11:48 schrieb Ludovic Courtès:
> LGTM with these changes.

I pushed the patch series with all your requests handled. Thanks for
reviewing and expeling my errors :-)

-- 
Regards
Hartmut Goebel

| Hartmut Goebel          | h.goebel@crazy-compilers.com               |
| www.crazy-compilers.com | compilers which you thought are impossible |

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2016-11-10 13:28 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-08 21:37 [PATCH 1/3] gnu: Add python-pypdf2 Hartmut Goebel
2016-11-08 21:37 ` [PATCH 2/3] gnu: Add python-pypdf Hartmut Goebel
2016-11-08 23:57   ` Leo Famulari
2016-11-09 22:04     ` Hartmut Goebel
2016-11-09  7:19   ` Efraim Flashner
2016-11-09 22:10     ` Hartmut Goebel
2016-11-08 21:37 ` [PATCH 3/3] gnu: Add pdfposter Hartmut Goebel
2016-11-09  0:02   ` Leo Famulari
2016-11-09 22:19     ` Hartmut Goebel
2016-11-08 23:55 ` [PATCH 1/3] gnu: Add python-pypdf2 Leo Famulari
2016-11-09 21:59   ` Hartmut Goebel
2016-11-09 22:39 ` [Patch v2 " Hartmut Goebel
2016-11-09 22:39   ` [Patch v2 2/3] gnu: Add python-pypdf Hartmut Goebel
2016-11-10 10:47     ` Ludovic Courtès
2016-11-09 22:39   ` [Patch v2 3/3] gnu: Add pdfposter Hartmut Goebel
2016-11-10  7:51     ` Efraim Flashner
2016-11-10 10:48       ` Ludovic Courtès
2016-11-10 13:28         ` Hartmut Goebel
2016-11-10 10:46   ` [Patch v2 1/3] gnu: Add python-pypdf2 Ludovic Courtès
2016-11-10 10:58     ` Hartmut Goebel
2016-11-10 12:35       ` Ludovic Courtès
2016-11-10 13:10         ` Hartmut Goebel

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.