GNU bug report logs - #43443
[PATCH] gnu: Add python-pypandoc.

Previous Next

Package: guix-patches;

Reported by: Konrad Hinsen <konrad.hinsen <at> fastmail.net>

Date: Wed, 16 Sep 2020 10:00:02 UTC

Severity: normal

Tags: patch

Done: Ricardo Wurmus <rekado <at> elephly.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43443 in the body.
You can then email your comments to 43443 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 10:00:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Konrad Hinsen <konrad.hinsen <at> fastmail.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Wed, 16 Sep 2020 10:00:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 11:59:18 +0200
* gnu/packages/python-xyz.scm (python-pypandoc): New variable.
---
 gnu/packages/python-xyz.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 593bb3f468..24fc512178 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -129,6 +129,7 @@
   #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
@@ -21979,3 +21980,39 @@ dates in almost any string formats commonly found on web pages.")
     (description "Safety checks installed dependencies for known vulnerabilities.
 By default it uses the open Python vulnerability database Safety DB.")
   (license license:expat)))
+
+(define-public python-pypandoc
+  (package
+    (name "python-pypandoc")
+    (version "1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pypandoc" version))
+       (sha256
+        (base32
+         "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
+    (build-system python-build-system)
+    (inputs
+     `(("pandoc" ,ghc-pandoc)
+       ("pandoc-citeproc" ,ghc-pandoc-citeproc)))
+    (propagated-inputs
+     `(("pip" ,python-pip)
+       ("setuptools" ,python-setuptools)
+       ("wheel" ,python-wheel)))
+    (native-inputs
+     `(("texlive" ,texlive)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-tests
+           (lambda _
+             ;; Disable test requiring network access
+             (substitute* "tests.py"
+               (("test_basic_conversion_from_http_url")
+                "skip_test_basic_conversion_from_http_url"))
+             #t)))))
+    (home-page "https://github.com/bebraw/pypandoc")
+    (synopsis "Python wrapper for pandoc.")
+    (description "Thin Python wrapper for pandoc.")
+    (license license:expat)))
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 10:09:01 GMT) Full text and rfc822 format available.

Message #8 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 43443 <at> debbugs.gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 12:09:14 +0200
Hi Konrad,

> * gnu/packages/python-xyz.scm (python-pypandoc): New variable.
[…]

> +    (inputs
> +     `(("pandoc" ,ghc-pandoc)
> +       ("pandoc-citeproc" ,ghc-pandoc-citeproc)))

Should this really be the Haskell library variants?  Or just the
executables?  If it’s just the executables you can use the “pandoc” and
“pandoc-citeproc” packages.

> +    (propagated-inputs
> +     `(("pip" ,python-pip)
> +       ("setuptools" ,python-setuptools)
> +       ("wheel" ,python-wheel)))
> +    (native-inputs
> +     `(("texlive" ,texlive)))

It would be better to avoid this huge monolithic package.  Does
texlive-tiny work?  If it doesn’t: what else does it need that could be
added to a texlive-union?

> +    (synopsis "Python wrapper for pandoc.")

There should be no trailing period.

> +    (description "Thin Python wrapper for pandoc.")

This should be a complete sentence.
<
-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 14:58:02 GMT) Full text and rfc822 format available.

Message #11 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 16:57:47 +0200
Hi Ricardo,

Thanks for your comments!

> Should this really be the Haskell library variants?  Or just the
> executables?  If it’s just the executables you can use the “pandoc” and
> “pandoc-citeproc” packages.

Ooops, I didn't know there were distinct packages for that! The binaries
are sufficient here.

> It would be better to avoid this huge monolithic package.  Does
> texlive-tiny work?  If it doesn’t: what else does it need that could be
> added to a texlive-union?

texlive-tiny doesn't work, and after experimenting for about an hour
I have given up on finding a small combination of packages for
a texlive-union. It needs ifluatex.sty which apparently is part of
texlive-latex-oberdiek, but if I add that package the test fails
in creating a temporary directory for whatever reason.

Another shortcut is disabling the one test case that depends
on LaTeX, and thus completely remove texlive from native-inputs.
Does that sound like an acceptable solution?

Cheers,
  Konrad




Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 15:18:01 GMT) Full text and rfc822 format available.

Message #14 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 43443 <at> debbugs.gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 17:18:55 +0200
[Message part 1 (text/plain, inline)]
Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

>> It would be better to avoid this huge monolithic package.  Does
>> texlive-tiny work?  If it doesn’t: what else does it need that could be
>> added to a texlive-union?
>
> texlive-tiny doesn't work, and after experimenting for about an hour
> I have given up on finding a small combination of packages for
> a texlive-union. It needs ifluatex.sty which apparently is part of
> texlive-latex-oberdiek, but if I add that package the test fails
> in creating a temporary directory for whatever reason.

The attached thing works for me:

[p.patch (text/x-patch, inline)]
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 24fc512178..7f724bc907 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -21994,14 +21994,19 @@ By default it uses the open Python vulnerability database Safety DB.")
          "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
     (build-system python-build-system)
     (inputs
-     `(("pandoc" ,ghc-pandoc)
-       ("pandoc-citeproc" ,ghc-pandoc-citeproc)))
+     `(("pandoc" ,pandoc)
+       ("pandoc-citeproc" ,pandoc-citeproc)))
     (propagated-inputs
      `(("pip" ,python-pip)
        ("setuptools" ,python-setuptools)
        ("wheel" ,python-wheel)))
     (native-inputs
-     `(("texlive" ,texlive)))
+     `(("texlive" ,(texlive-union (list texlive-amsfonts
+                                        texlive-fonts-ec
+                                        texlive-latex-hyperref
+                                        texlive-latex-oberdiek
+                                        texlive-lm
+                                        texlive-xcolor)))))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
@@ -22011,6 +22016,8 @@ By default it uses the open Python vulnerability database Safety DB.")
              (substitute* "tests.py"
                (("test_basic_conversion_from_http_url")
                 "skip_test_basic_conversion_from_http_url"))
+             ;; XXX: Needed by texlive-union to generate fonts
+             (setenv "HOME" "/tmp")
              #t)))))
     (home-page "https://github.com/bebraw/pypandoc")
     (synopsis "Python wrapper for pandoc.")
[Message part 3 (text/plain, inline)]
-- 
Ricardo

Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 16:37:01 GMT) Full text and rfc822 format available.

Message #17 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 43443 <at> debbugs.gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 18:36:46 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> The attached thing works for me:

OK, so the trick was to set $HOME!

I'll send an updated complete patch in a second...

Cheers,
  Konrad




Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 16:38:02 GMT) Full text and rfc822 format available.

Message #20 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: 43443 <at> debbugs.gnu.org
Subject: [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 18:37:39 +0200
* gnu/packages/python-xyz.scm (python-pypandoc): New variable.
---
 gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 593bb3f468..2f66e3ff31 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -129,6 +129,7 @@
   #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
@@ -21979,3 +21980,47 @@ dates in almost any string formats commonly found on web pages.")
     (description "Safety checks installed dependencies for known vulnerabilities.
 By default it uses the open Python vulnerability database Safety DB.")
   (license license:expat)))
+
+(define-public python-pypandoc
+  (package
+    (name "python-pypandoc")
+    (version "1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pypandoc" version))
+       (sha256
+        (base32
+         "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
+    (build-system python-build-system)
+    (inputs
+     `(("pandoc" ,pandoc)
+       ("pandoc-citeproc" ,pandoc-citeproc)))
+    (propagated-inputs
+     `(("pip" ,python-pip)
+       ("setuptools" ,python-setuptools)
+       ("wheel" ,python-wheel)))
+    (native-inputs
+     `(("texlive" ,(texlive-union (list texlive-amsfonts
+                                        texlive-fonts-ec
+                                        texlive-latex-hyperref
+                                        texlive-latex-oberdiek
+                                        texlive-lm
+                                        texlive-xcolor)))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-tests
+           (lambda _
+             ;; Disable test requiring network access
+             (substitute* "tests.py"
+               (("test_basic_conversion_from_http_url")
+                "skip_test_basic_conversion_from_http_url"))
+             ;; Needed by texlive-union to generate fonts
+             (setenv "HOME" "/tmp")
+             #t)))))
+    (home-page "https://github.com/bebraw/pypandoc")
+    (synopsis "Python wrapper for pandoc")
+    (description "pypandoc is a thin Python wrapper around pandoc
+and pandoc-citeproc.")
+    (license license:expat)))
-- 
2.28.0





Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 19:31:01 GMT) Full text and rfc822 format available.

Message #23 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 43443 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Wed, 16 Sep 2020 21:31:56 +0200
Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

> * gnu/packages/python-xyz.scm (python-pypandoc): New variable.

Looks good to me.  “guix lint python-pypandoc” says that we don’t need
pip and setuptools as propagated-inputs, and I can confirm that the
package builds fine without them.

Is it okay to remove them?

-- 
Ricardo




Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Wed, 16 Sep 2020 19:31:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Thu, 17 Sep 2020 05:55:01 GMT) Full text and rfc822 format available.

Message #29 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: Ricardo Wurmus <rekado <at> elephly.net>
Cc: 43443 <at> debbugs.gnu.org, guix-patches <at> gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Thu, 17 Sep 2020 07:54:29 +0200
Ricardo Wurmus <rekado <at> elephly.net> writes:

> Looks good to me.  “guix lint python-pypandoc” says that we don’t need
> pip and setuptools as propagated-inputs, and I can confirm that the
> package builds fine without them.
>
> Is it okay to remove them?

Sure! And I have to admit that I completely forgot to run lint.
Summer vacation made me forget some good habits!

Konrad.




Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Thu, 17 Sep 2020 05:55:02 GMT) Full text and rfc822 format available.

Information forwarded to guix-patches <at> gnu.org:
bug#43443; Package guix-patches. (Thu, 17 Sep 2020 07:26:01 GMT) Full text and rfc822 format available.

Message #35 received at 43443 <at> debbugs.gnu.org (full text, mbox):

From: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
To: 43443 <at> debbugs.gnu.org
Subject: Re: [PATCH] gnu: Add python-pypandoc.
Date: Thu, 17 Sep 2020 09:24:57 +0200
* gnu/packages/python-xyz.scm (python-pypandoc): New variable.
---
 gnu/packages/python-xyz.scm | 43 +++++++++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 593bb3f468..147c3bccb8 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -129,6 +129,7 @@
   #:use-module (gnu packages gsasl)
   #:use-module (gnu packages gstreamer)
   #:use-module (gnu packages gtk)
+  #:use-module (gnu packages haskell-xyz)
   #:use-module (gnu packages icu4c)
   #:use-module (gnu packages image)
   #:use-module (gnu packages imagemagick)
@@ -21979,3 +21980,45 @@ dates in almost any string formats commonly found on web pages.")
     (description "Safety checks installed dependencies for known vulnerabilities.
 By default it uses the open Python vulnerability database Safety DB.")
   (license license:expat)))
+
+(define-public python-pypandoc
+  (package
+    (name "python-pypandoc")
+    (version "1.5")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pypandoc" version))
+       (sha256
+        (base32
+         "1zvn9764cf7kkjkmr9gw6wc8adpk06qxr1rhxwa9pg0zmdvrk90l"))))
+    (build-system python-build-system)
+    (inputs
+     `(("pandoc" ,pandoc)
+       ("pandoc-citeproc" ,pandoc-citeproc)))
+    (propagated-inputs
+     `(("wheel" ,python-wheel)))
+    (native-inputs
+     `(("texlive" ,(texlive-union (list texlive-amsfonts
+                                        texlive-fonts-ec
+                                        texlive-latex-hyperref
+                                        texlive-latex-oberdiek
+                                        texlive-lm
+                                        texlive-xcolor)))))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'check 'disable-tests
+           (lambda _
+             ;; Disable test requiring network access
+             (substitute* "tests.py"
+               (("test_basic_conversion_from_http_url")
+                "skip_test_basic_conversion_from_http_url"))
+             ;; Needed by texlive-union to generate fonts
+             (setenv "HOME" "/tmp")
+             #t)))))
+    (home-page "https://github.com/bebraw/pypandoc")
+    (synopsis "Python wrapper for pandoc")
+    (description "The package pypandoc is a thin Python wrapper around
+pandoc and pandoc-citeproc.")
+    (license license:expat)))
-- 
2.28.0





Reply sent to Ricardo Wurmus <rekado <at> elephly.net>:
You have taken responsibility. (Thu, 17 Sep 2020 09:43:01 GMT) Full text and rfc822 format available.

Notification sent to Konrad Hinsen <konrad.hinsen <at> fastmail.net>:
bug acknowledged by developer. (Thu, 17 Sep 2020 09:43:01 GMT) Full text and rfc822 format available.

Message #40 received at 43443-done <at> debbugs.gnu.org (full text, mbox):

From: Ricardo Wurmus <rekado <at> elephly.net>
To: Konrad Hinsen <konrad.hinsen <at> fastmail.net>
Cc: 43443-done <at> debbugs.gnu.org
Subject: Re: [bug#43443] [PATCH] gnu: Add python-pypandoc.
Date: Thu, 17 Sep 2020 11:43:56 +0200
Konrad Hinsen <konrad.hinsen <at> fastmail.net> writes:

> Ricardo Wurmus <rekado <at> elephly.net> writes:
>
>> Looks good to me.  “guix lint python-pypandoc” says that we don’t need
>> pip and setuptools as propagated-inputs, and I can confirm that the
>> package builds fine without them.
>>
>> Is it okay to remove them?
>
> Sure! And I have to admit that I completely forgot to run lint.
> Summer vacation made me forget some good habits!

Heh, no problem!

I pushed it with these changes to the “master” branch with commit
731354b8d7.

-- 
Ricardo




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 15 Oct 2020 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 191 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.