diff mbox series

[bug#47593,3/6] gnu: python-xyz: Add python-uqbar.

Message ID 20210404122005.33127-4-me@bonfacemunyoki.com
State Accepted
Headers show
Series *** Add Python Abjad v3.3 *** | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch fail View Laminar job
cbaines/issue success View issue

Commit Message

Munyoki Kilyungi April 4, 2021, 12:20 p.m. UTC
* gnu/packages/python-xyz.scm (python-uqbar): New variable.

Co-authored-by: jgart <jgart@dismail.de>
---
 gnu/packages/python-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++-
 1 file changed, 51 insertions(+), 1 deletion(-)

Comments

Efraim Flashner April 13, 2021, 1:14 p.m. UTC | #1
I haven't tried building this package yet. The sphinx packages are in
sphinx.scm and the graphviz packages are in graphviz.scm. I think I
would put it in graphviz.

On Sun, Apr 04, 2021 at 03:20:02PM +0300, BonfaceKilz wrote:
> * gnu/packages/python-xyz.scm (python-uqbar): New variable.
> 
> Co-authored-by: jgart <jgart@dismail.de>
> ---
>  gnu/packages/python-xyz.scm | 52 ++++++++++++++++++++++++++++++++++++-
>  1 file changed, 51 insertions(+), 1 deletion(-)
> 
> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
> index b69ea2e32a..63eecb591f 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -88,7 +88,7 @@
>  ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
>  ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
>  ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
> -;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
> +;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
>  ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
>  ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
>  ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
> @@ -24258,3 +24258,53 @@ iGoogle subscription lists.")
>      (description
>       "Small helper library to convert arabic to roman numerals.")
>      (license license:psfl)))
> +
> +(define-public python-uqbar
> +  (package
> +    (name "python-uqbar")
> +    (version "0.5.1")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri
> +        (string-append
> +         "https://github.com/josiah-wolf-oberholtzer/"
> +         "uqbar/archive/refs/tags/v" version ".tar.gz"))

guix lint should've caught this. If the pypi version from 'guix import
ppyi uqbar' doesn't work for building then you should use git-fetch to
download the source. The github archive URLs tend to get regenerated
from time to time.

> +       (sha256
> +        (base32
> +         "02kfvwh94ca0y3hsfrc071ga3g3vqflhyv4w4hif34dyj2skvpa8"))))
> +    (build-system python-build-system)
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'patch
> +           (lambda _
> +             (substitute* "setup.py"
> +               ;; Latest versions of sphink-rtd-theme require npm to build.
> +               (("sphinx-rtd-theme >= 0.4.0") "sphinx-rtd-theme >= 0.2.4")
> +               (("black == 19.10b0") "black >= 19.10b0"))
> +             #t))
> +         (replace 'check
> +           (lambda _
> +             (invoke "python" "-m" "pytest" "tests")

We want the ability to skip the tests, so this should be
(lambda* (#:key tests? #:allow-other-keys)
  (when tests?
    (invoke ...

> +             #t)))))
> +    (propagated-inputs
> +     `(("graphviz" ,graphviz)

Is it possible to substitute the actual calls to the graphviz binaries
in the package? We don't want to have to propagate non-python packages.

> +       ("python-black" ,python-black)
> +       ("python-sphinx" ,python-sphinx)
> +       ("python-sphinx-rtd-theme"
> +        ,python-sphinx-rtd-theme)
> +       ("python-unidecode" ,python-unidecode)))
> +    (native-inputs
> +     `(("python-flake8" ,python-flake8)
> +       ("python-isort" ,python-isort)
> +       ("python-mypy" ,python-mypy)
> +       ("python-pytest" ,python-pytest)
> +       ("python-pytest-cov" ,python-pytest-cov)))
> +    (home-page
> +     "https://github.com/josiah-wolf-oberholtzer/uqbar")
> +    (synopsis
> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
> +    (description
> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")

This should be a full sentence.

> +    (license license:expat)))
> -- 
> 2.31.0
> 
> 
> 
>
Munyoki Kilyungi April 13, 2021, 8:52 p.m. UTC | #2
Efraim Flashner <efraim@flashner.co.il> writes:

> I haven't tried building this package yet. The sphinx packages are in
> sphinx.scm and the graphviz packages are in graphviz.scm. I think I
> would put it in graphviz.
>

Now that you've pointed it out, I see it! That
makes sense.

[...]

> guix lint should've caught this.

I seem to have skipped doing this. I need to find
a way to integrating "guix lint" to my Emacs
workflow since I seem to always somehow forget to
do this.

> If the pypi version from 'guix import
> ppyi uqbar' doesn't work for building then you should use git-fetch to
> download the source. The github archive URLs tend to get regenerated
> from time to time.

I went with the GitHub version since the pypi version
doesn't have tests. So in such cases, is it still
preferable to use the pypi version?

>> +       (sha256
>> +        (base32
>> +         "02kfvwh94ca0y3hsfrc071ga3g3vqflhyv4w4hif34dyj2skvpa8"))))
>> +    (build-system python-build-system)
>> +    (arguments
>> +     `(#:phases
>> +       (modify-phases %standard-phases
>> +         (add-after 'unpack 'patch
>> +           (lambda _
>> +             (substitute* "setup.py"
>> +               ;; Latest versions of sphink-rtd-theme require npm to build.
>> +               (("sphinx-rtd-theme >= 0.4.0") "sphinx-rtd-theme >= 0.2.4")
>> +               (("black == 19.10b0") "black >= 19.10b0"))
>> +             #t))
>> +         (replace 'check
>> +           (lambda _
>> +             (invoke "python" "-m" "pytest" "tests")
>
> We want the ability to skip the tests, so this should be
> (lambda* (#:key tests? #:allow-other-keys)
>   (when tests?
>     (invoke ...
>

Never knew this! Learnt something new. Thanks!

>> +             #t)))))
>> +    (propagated-inputs
>> +     `(("graphviz" ,graphviz)
>
> Is it possible to substitute the actual calls to the graphviz binaries
> in the package?

Not really. However...

> We don't want to have to propagate non-python packages.
>

... We could add the graphviz to native
inputs since it's only required at build-time when
running one of the tests.

>> +       ("python-black" ,python-black)
>> +       ("python-sphinx" ,python-sphinx)
>> +       ("python-sphinx-rtd-theme"
>> +        ,python-sphinx-rtd-theme)
>> +       ("python-unidecode" ,python-unidecode)))
>> +    (native-inputs
>> +     `(("python-flake8" ,python-flake8)
>> +       ("python-isort" ,python-isort)
>> +       ("python-mypy" ,python-mypy)
>> +       ("python-pytest" ,python-pytest)
>> +       ("python-pytest-cov" ,python-pytest-cov)))
>> +    (home-page
>> +     "https://github.com/josiah-wolf-oberholtzer/uqbar")
>> +    (synopsis
>> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
>> +    (description
>> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
>
> This should be a full sentence.
>

Noted :)
>> +    (license license:expat)))
>> -- 
>> 2.31.0
>> 
>> 
>> 
>>
Efraim Flashner April 14, 2021, 3:14 p.m. UTC | #3
On Tue, Apr 13, 2021 at 11:52:15PM +0300, Bonface Munyoki K. wrote:
> Efraim Flashner <efraim@flashner.co.il> writes:
> 
> > I haven't tried building this package yet. The sphinx packages are in
> > sphinx.scm and the graphviz packages are in graphviz.scm. I think I
> > would put it in graphviz.
> >
> 
> Now that you've pointed it out, I see it! That
> makes sense.
> 
> [...]
> 
> > guix lint should've caught this.
> 
> I seem to have skipped doing this. I need to find
> a way to integrating "guix lint" to my Emacs
> workflow since I seem to always somehow forget to
> do this.
> 
> > If the pypi version from 'guix import
> > ppyi uqbar' doesn't work for building then you should use git-fetch to
> > download the source. The github archive URLs tend to get regenerated
> > from time to time.
> 
> I went with the GitHub version since the pypi version
> doesn't have tests. So in such cases, is it still
> preferable to use the pypi version?

In that case the git version is normally preferable so we can actually
run the tests, but it should use git-fetch to download the sources.

> >> +       (sha256
> >> +        (base32
> >> +         "02kfvwh94ca0y3hsfrc071ga3g3vqflhyv4w4hif34dyj2skvpa8"))))
> >> +    (build-system python-build-system)
> >> +    (arguments
> >> +     `(#:phases
> >> +       (modify-phases %standard-phases
> >> +         (add-after 'unpack 'patch
> >> +           (lambda _
> >> +             (substitute* "setup.py"
> >> +               ;; Latest versions of sphink-rtd-theme require npm to build.
> >> +               (("sphinx-rtd-theme >= 0.4.0") "sphinx-rtd-theme >= 0.2.4")
> >> +               (("black == 19.10b0") "black >= 19.10b0"))
> >> +             #t))
> >> +         (replace 'check
> >> +           (lambda _
> >> +             (invoke "python" "-m" "pytest" "tests")
> >
> > We want the ability to skip the tests, so this should be
> > (lambda* (#:key tests? #:allow-other-keys)
> >   (when tests?
> >     (invoke ...
> >
> 
> Never knew this! Learnt something new. Thanks!
> 
> >> +             #t)))))
> >> +    (propagated-inputs
> >> +     `(("graphviz" ,graphviz)
> >
> > Is it possible to substitute the actual calls to the graphviz binaries
> > in the package?
> 
> Not really. However...
> 
> > We don't want to have to propagate non-python packages.
> >
> 
> ... We could add the graphviz to native
> inputs since it's only required at build-time when
> running one of the tests.
> 
> >> +       ("python-black" ,python-black)
> >> +       ("python-sphinx" ,python-sphinx)
> >> +       ("python-sphinx-rtd-theme"
> >> +        ,python-sphinx-rtd-theme)
> >> +       ("python-unidecode" ,python-unidecode)))
> >> +    (native-inputs
> >> +     `(("python-flake8" ,python-flake8)
> >> +       ("python-isort" ,python-isort)
> >> +       ("python-mypy" ,python-mypy)
> >> +       ("python-pytest" ,python-pytest)
> >> +       ("python-pytest-cov" ,python-pytest-cov)))
> >> +    (home-page
> >> +     "https://github.com/josiah-wolf-oberholtzer/uqbar")
> >> +    (synopsis
> >> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
> >> +    (description
> >> +     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
> >
> > This should be a full sentence.
> >
> 
> Noted :)
> >> +    (license license:expat)))
> >> -- 
> >> 2.31.0
> >> 
> >> 
> >> 
> >> 
> 
> -- 
> Bonface M. K. D4F09EB110177E03C28E2FE1F5BBAE1E0392253F
> Humble GNU Emacs User / Bearer of scheme-y parens
> Curator: <https://upbookclub.com> / Twitter: @BonfaceKilz
diff mbox series

Patch

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b69ea2e32a..63eecb591f 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -88,7 +88,7 @@ 
 ;;; Copyright © 2020 Malte Frank Gerdes <malte.f.gerdes@gmail.com>
 ;;; Copyright © 2020 Joseph LaFreniere <joseph@lafreniere.xyz>
 ;;; Copyright © 2020 Tim Gesthuizen <tim.gesthuizen@yahoo.de>
-;;; Copyright © 2020 Bonface Munyoki Kilyungi <bonfacemunyoki@gmail.com>
+;;; Copyright © 2020, 2021 Bonface Munyoki Kilyungi <me@bonfacemunyoki.com>
 ;;; Copyright © 2020 Ekaitz Zarraga <ekaitz@elenq.tech>
 ;;; Copyright © 2020 Diego N. Barbato <dnbarbato@posteo.de>
 ;;; Copyright © 2020 Leo Prikler <leo.prikler@student.tugraz.at>
@@ -24258,3 +24258,53 @@  iGoogle subscription lists.")
     (description
      "Small helper library to convert arabic to roman numerals.")
     (license license:psfl)))
+
+(define-public python-uqbar
+  (package
+    (name "python-uqbar")
+    (version "0.5.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri
+        (string-append
+         "https://github.com/josiah-wolf-oberholtzer/"
+         "uqbar/archive/refs/tags/v" version ".tar.gz"))
+       (sha256
+        (base32
+         "02kfvwh94ca0y3hsfrc071ga3g3vqflhyv4w4hif34dyj2skvpa8"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch
+           (lambda _
+             (substitute* "setup.py"
+               ;; Latest versions of sphink-rtd-theme require npm to build.
+               (("sphinx-rtd-theme >= 0.4.0") "sphinx-rtd-theme >= 0.2.4")
+               (("black == 19.10b0") "black >= 19.10b0"))
+             #t))
+         (replace 'check
+           (lambda _
+             (invoke "python" "-m" "pytest" "tests")
+             #t)))))
+    (propagated-inputs
+     `(("graphviz" ,graphviz)
+       ("python-black" ,python-black)
+       ("python-sphinx" ,python-sphinx)
+       ("python-sphinx-rtd-theme"
+        ,python-sphinx-rtd-theme)
+       ("python-unidecode" ,python-unidecode)))
+    (native-inputs
+     `(("python-flake8" ,python-flake8)
+       ("python-isort" ,python-isort)
+       ("python-mypy" ,python-mypy)
+       ("python-pytest" ,python-pytest)
+       ("python-pytest-cov" ,python-pytest-cov)))
+    (home-page
+     "https://github.com/josiah-wolf-oberholtzer/uqbar")
+    (synopsis
+     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
+    (description
+     "Tools for building documentation with Sphinx, Graphviz and LaTeX")
+    (license license:expat)))