From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59020) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j1mmZ-0007wQ-CF for guix-patches@gnu.org; Wed, 12 Feb 2020 02:50:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j1mmY-0000RY-2W for guix-patches@gnu.org; Wed, 12 Feb 2020 02:50:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:51824) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1j1mmX-0000RS-VJ for guix-patches@gnu.org; Wed, 12 Feb 2020 02:50:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1j1mmX-0006xm-SE for guix-patches@gnu.org; Wed, 12 Feb 2020 02:50:01 -0500 Subject: [bug#39572] [PATCH] gnu: Add python-sphinx-autodoc-typehints. Resent-Message-ID: Date: Wed, 12 Feb 2020 09:48:27 +0200 From: Efraim Flashner Message-ID: <20200212074827.GE26092@E5400> References: <20200212001420.24513-1-sirgazil@zoho.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XuV1QlJbYrcVoo+x" Content-Disposition: inline In-Reply-To: <20200212001420.24513-1-sirgazil@zoho.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: sirgazil Cc: 39572@debbugs.gnu.org --XuV1QlJbYrcVoo+x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 wro= te: > * gnu/packages/sphinx.scm (python-sphinx-autodoc-typehints): New variable. > --- > gnu/packages/sphinx.scm | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) >=20 > 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 =C2=A9 2019 Nicolas Goaziou > ;;; Copyright =C2=A9 2019 Alexandros Theodotou > ;;; Copyright =C2=A9 2019 Brett Gilio > +;;; Copyright =C2=A9 2020 sirgazil > ;;; > ;;; This file is part of GNU Guix. > ;;; > @@ -597,3 +598,27 @@ to be able to read and render the Doxygen xml output= =2E") > "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-t= ypehints-1.10.3.drv-0/sphinx-autodoc-typehints-1.10.3/tests/conftest.py'. tests/conftest.py:8: in from sphobjinv import Inventory E ModuleNotFoundError: No module named 'sphobjinv' command "pytest" failed with status 4 According to here=C2=B9 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))) > --=20 > 2.25.0 >=20 =C2=B9 https://github.com/agronholm/sphinx-autodoc-typehints/blob/1.10.3/se= tup.cfg --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --XuV1QlJbYrcVoo+x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl5DrcgACgkQQarn3Mo9 g1HGexAAnHg/N0Wr/fBA30k2/HJ4f/Mr7Jd0pDi3H/j23wE69UBbGH2I17y4oBIe s1eq/J8rvncU7VXv2CZMYv2KMBBOlnfRxQ85c7iK1iHXKh3duhG+iFBW2LHmXaWD 47dJ5dtv+rO60zV9yRP44LTyweqPLMnbvxWeJjEJZg3q9fvkCdW+QbTzJ58WTMs0 uObXhcfSgMoQeMo4f4/2VFzmgL70DOcfS6GiInHug0I3SujlJ2Ok8wdVVWH7gBA+ 9bbQI+r0DvppJpcrQPJpv4RGGkinNap/Azh9RBzjjqQent/pSew7UFxXvJqVc5of 2ukomCYcECPXHWdGXf0V/85hUmuXAnc27gKOzHtlTuR5a0GxTtl2Afp4RD/Mt7Ve pKonCFQmiAyrbpwaPRqoaXfOmSPO/8Jf2kvv72YlSmqL+f2pCEezTxThfUg5Bsfk P7YY4q9P/bmbBpt174FouI/9TnQQ6cDQsJU2atcyWSBjS4Tv5HA+zq3BQ5aF0EA3 RN/ClbPrHAsgN9SXoILNiLKil4Spt6GFhSNHwiMNSJpQjnrziogN3QNhGCI5pa58 uErOtNuyNq6hEuQ6eNMwDfxUkcf7vcXGkAzm/IZ8oMBf7TUBydn64wezkM6Y2GE2 ZfJKaUxum/+sHJ2ikOgJd8tqb0F96d33ds9zrcewNfWXlncW/6M= =4Ld7 -----END PGP SIGNATURE----- --XuV1QlJbYrcVoo+x--