diff mbox series

[bug#43443] gnu: Add python-pypandoc.

Message ID m1y2l9y8x8.fsf@khs-macbook.home
State Accepted
Headers show
Series [bug#43443] gnu: Add python-pypandoc. | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Konrad Hinsen Sept. 16, 2020, 4:37 p.m. UTC
* gnu/packages/python-xyz.scm (python-pypandoc): New variable.
---
 gnu/packages/python-xyz.scm | 45 +++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

Comments

Ricardo Wurmus Sept. 16, 2020, 7:31 p.m. UTC | #1
Konrad Hinsen <konrad.hinsen@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?
Konrad Hinsen Sept. 17, 2020, 5:54 a.m. UTC | #2
Ricardo Wurmus <rekado@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.
Ricardo Wurmus Sept. 17, 2020, 9:43 a.m. UTC | #3
Konrad Hinsen <konrad.hinsen@fastmail.net> writes:

> Ricardo Wurmus <rekado@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.
diff mbox series

Patch

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