* [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints.
@ 2020-02-12 0:14 sirgazil via Guix-patches via
2020-02-12 7:48 ` Efraim Flashner
0 siblings, 1 reply; 4+ messages in thread
From: sirgazil via Guix-patches via @ 2020-02-12 0:14 UTC (permalink / raw)
To: 39572; +Cc: sirgazil
* gnu/packages/sphinx.scm (python-sphinx-autodoc-typehints): New variable.
---
gnu/packages/sphinx.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 4e4abccb04..41bde173c3 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -13,6 +13,7 @@
;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
+;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -597,3 +598,27 @@ to be able to read and render the Doxygen xml output.")
"A utility tool that provides several features that make it easy to
translate and to apply translation to Sphinx generated document.")
(license license:bsd-2)))
+
+(define-public python-sphinx-autodoc-typehints
+ (package
+ (name "python-sphinx-autodoc-typehints")
+ (version "1.10.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "sphinx-autodoc-typehints" version))
+ (sha256
+ (base32
+ "1w6zy3cyp24jsdi8dcynrinafw2a0k5vblqy9lncm6j7cw0iicx6"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools-scm" ,python-setuptools-scm)))
+ (propagated-inputs
+ `(("python-sphinx" ,python-sphinx)))
+ (home-page "https://github.com/agronholm/sphinx-autodoc-typehints")
+ (synopsis "Type hints support for the Sphinx autodoc extension")
+ (description
+ "This extension allows you to use Python 3 annotations for
+documenting acceptable argument types and return value types of
+functions.")
+ (license license:expat)))
--
2.25.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints.
2020-02-12 0:14 [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints sirgazil via Guix-patches via
@ 2020-02-12 7:48 ` Efraim Flashner
2020-02-12 14:28 ` sirgazil via Guix-patches via
0 siblings, 1 reply; 4+ messages in thread
From: Efraim Flashner @ 2020-02-12 7:48 UTC (permalink / raw)
To: sirgazil; +Cc: 39572
[-- Attachment #1: Type: text/plain, Size: 3266 bytes --]
Overall the package looks good. I ran into an issue with the tests,
namely that they weren't run. (This is becoming a common issue with our
python packages as they change how the test suite is run)
On Tue, Feb 11, 2020 at 07:14:20PM -0500, sirgazil via Guix-patches via wrote:
> * gnu/packages/sphinx.scm (python-sphinx-autodoc-typehints): New variable.
> ---
> gnu/packages/sphinx.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
> index 4e4abccb04..41bde173c3 100644
> --- a/gnu/packages/sphinx.scm
> +++ b/gnu/packages/sphinx.scm
> @@ -13,6 +13,7 @@
> ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
> ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
> ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
> +;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -597,3 +598,27 @@ to be able to read and render the Doxygen xml output.")
> "A utility tool that provides several features that make it easy to
> translate and to apply translation to Sphinx generated document.")
> (license license:bsd-2)))
> +
> +(define-public python-sphinx-autodoc-typehints
> + (package
> + (name "python-sphinx-autodoc-typehints")
> + (version "1.10.3")
> + (source
> + (origin
> + (method url-fetch)
> + (uri (pypi-uri "sphinx-autodoc-typehints" version))
> + (sha256
> + (base32
> + "1w6zy3cyp24jsdi8dcynrinafw2a0k5vblqy9lncm6j7cw0iicx6"))))
> + (build-system python-build-system)
I added the following snippet here to run the tests:
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
(lambda _
(invoke "pytest"))))))
And added python-pytest to the native-inputs but it turns out that
wasn't enough:
starting phase `check'
ImportError while loading conftest '/tmp/guix-build-python-sphinx-autodoc-typehints-1.10.3.drv-0/sphinx-autodoc-typehints-1.10.3/tests/conftest.py'.
tests/conftest.py:8: in <module>
from sphobjinv import Inventory
E ModuleNotFoundError: No module named 'sphobjinv'
command "pytest" failed with status 4
According to here¹ there are a couple of other dependencies that are
needed to run the tests, including sphobjinv which isn't packaged yet.
> + (native-inputs
> + `(("python-setuptools-scm" ,python-setuptools-scm)))
> + (propagated-inputs
> + `(("python-sphinx" ,python-sphinx)))
> + (home-page "https://github.com/agronholm/sphinx-autodoc-typehints")
> + (synopsis "Type hints support for the Sphinx autodoc extension")
> + (description
> + "This extension allows you to use Python 3 annotations for
> +documenting acceptable argument types and return value types of
> +functions.")
> + (license license:expat)))
> --
> 2.25.0
>
¹ https://github.com/agronholm/sphinx-autodoc-typehints/blob/1.10.3/setup.cfg
--
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: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints.
2020-02-12 7:48 ` Efraim Flashner
@ 2020-02-12 14:28 ` sirgazil via Guix-patches via
2023-06-20 21:39 ` bug#39572: " Jelle Licht
0 siblings, 1 reply; 4+ messages in thread
From: sirgazil via Guix-patches via @ 2020-02-12 14:28 UTC (permalink / raw)
To: Efraim Flashner; +Cc: 39572
---- On Wed, 12 Feb 2020 02:48:27 -0500 Efraim Flashner <efraim@flashner.co.il> wrote ----
> Overall the package looks good. I ran into an issue with the tests,
> namely that they weren't run. (This is becoming a common issue with our
> python packages as they change how the test suite is run)
>
> On Tue, Feb 11, 2020 at 07:14:20PM -0500, sirgazil via Guix-patches via wrote:
> > * gnu/packages/sphinx.scm (python-sphinx-autodoc-typehints): New variable.
> > ---
> > gnu/packages/sphinx.scm | 25 +++++++++++++++++++++++++
> > 1 file changed, 25 insertions(+)
> >
> > diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
> > index 4e4abccb04..41bde173c3 100644
> > --- a/gnu/packages/sphinx.scm
> > +++ b/gnu/packages/sphinx.scm
> > @@ -13,6 +13,7 @@
> > ;;; Copyright © 2019 Nicolas Goaziou <mail@nicolasgoaziou.fr>
> > ;;; Copyright © 2019 Alexandros Theodotou <alex@zrythm.org>
> > ;;; Copyright © 2019 Brett Gilio <brettg@gnu.org>
> > +;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
> > ;;;
> > ;;; This file is part of GNU Guix.
> > ;;;
> > @@ -597,3 +598,27 @@ to be able to read and render the Doxygen xml output.")
> > "A utility tool that provides several features that make it easy to
> > translate and to apply translation to Sphinx generated document.")
> > (license license:bsd-2)))
> > +
> > +(define-public python-sphinx-autodoc-typehints
> > + (package
> > + (name "python-sphinx-autodoc-typehints")
> > + (version "1.10.3")
> > + (source
> > + (origin
> > + (method url-fetch)
> > + (uri (pypi-uri "sphinx-autodoc-typehints" version))
> > + (sha256
> > + (base32
> > + "1w6zy3cyp24jsdi8dcynrinafw2a0k5vblqy9lncm6j7cw0iicx6"))))
> > + (build-system python-build-system)
>
> I added the following snippet here to run the tests:
>
> (arguments
> `(#:phases
> (modify-phases %standard-phases
> (replace 'check
> (lambda _
> (invoke "pytest"))))))
>
> And added python-pytest to the native-inputs but it turns out that
> wasn't enough:
>
> starting phase `check'
> ImportError while loading conftest '/tmp/guix-build-python-sphinx-autodoc-typehints-1.10.3.drv-0/sphinx-autodoc-typehints-1.10.3/tests/conftest.py'.
> tests/conftest.py:8: in <module>
> from sphobjinv import Inventory
> E ModuleNotFoundError: No module named 'sphobjinv'
> command "pytest" failed with status 4
>
> According to here¹ there are a couple of other dependencies that are
> needed to run the tests, including sphobjinv which isn't packaged yet.
Oh, I read "extras_require" as "completely optional". I'll be more careful with that.
> > + (native-inputs
> > + `(("python-setuptools-scm" ,python-setuptools-scm)))
> > + (propagated-inputs
> > + `(("python-sphinx" ,python-sphinx)))
> > + (home-page "https://github.com/agronholm/sphinx-autodoc-typehints")
> > + (synopsis "Type hints support for the Sphinx autodoc extension")
> > + (description
> > + "This extension allows you to use Python 3 annotations for
> > +documenting acceptable argument types and return value types of
> > +functions.")
> > + (license license:expat)))
> > --
> > 2.25.0
> >
>
> ¹ https://github.com/agronholm/sphinx-autodoc-typehints/blob/1.10.3/setup.cfg
>
> --
> 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
>
Thank you very much for your review, Efraim. I'll check if I'm able to package whatever is missing.
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#39572: [PATCH] gnu: Add python-sphinx-autodoc-typehints.
2020-02-12 14:28 ` sirgazil via Guix-patches via
@ 2023-06-20 21:39 ` Jelle Licht
0 siblings, 0 replies; 4+ messages in thread
From: Jelle Licht @ 2023-06-20 21:39 UTC (permalink / raw)
To: 39572; +Cc: sirgazil, Efraim Flashner
We now have python-sphinx-autodoc-typehints@1.18.3 available in guix
master. Closing!
- Jelle
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-06-20 21:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-12 0:14 [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints sirgazil via Guix-patches via
2020-02-12 7:48 ` Efraim Flashner
2020-02-12 14:28 ` sirgazil via Guix-patches via
2023-06-20 21:39 ` bug#39572: " Jelle Licht
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.