From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: [PATCH 3/4] gnu: Add python-sphinx-argparse. Date: Sun, 25 Sep 2016 22:17:27 +0100 Message-ID: <20160925211728.7636-3-mbakke@fastmail.com> References: <20160925211728.7636-1-mbakke@fastmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45311) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boGoQ-0002Fw-O7 for guix-devel@gnu.org; Sun, 25 Sep 2016 17:18:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1boGoP-0004ap-Ok for guix-devel@gnu.org; Sun, 25 Sep 2016 17:18:14 -0400 Received: from out2-smtp.messagingengine.com ([66.111.4.26]:49986) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1boGoN-0004YX-FU for guix-devel@gnu.org; Sun, 25 Sep 2016 17:18:13 -0400 In-Reply-To: <20160925211728.7636-1-mbakke@fastmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Cc: Marius Bakke * gnu/packages/python.scm (python-sphinx-argparse, python2-sphinx-argparse): New variables. --- gnu/packages/python.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 4b8caea..bb28363 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -10967,3 +10967,48 @@ mobile-friendly responsive design.") python-sphinx-bootstrap-theme))) (native-inputs `(("python2-setuptools" ,python2-setuptools))))) + +(define-public python-sphinx-argparse + (package + (name "python-sphinx-argparse") + (version "0.1.15") + (source (origin + (method url-fetch) + (uri (pypi-uri "sphinx-argparse" version)) + (sha256 + (base32 + "14wdxq379xxnhw0kgf8z6jqdi0rd4k5y20jllyar9mxwwjblayvq")))) + (build-system python-build-system) + (arguments + `(#:configure-flags '("--single-version-externally-managed" "--root=/") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'adjust-tests + ;; Two tests compare the output of "py.test --help" and fail + ;; when it gets ".py.test-real" back, so we substitute it here. + (lambda _ + (substitute* "test/test_parser.py" + (("py.test") ".py.test-real")) + #t)) + (delete 'check) + (add-after 'install 'check + (lambda _ (zero? (system* "py.test" "-vv"))))))) + (native-inputs + `(("python-pytest" ,python-pytest))) + (propagated-inputs + `(("python-sphinx" ,python-sphinx) + ("python-docutils" ,python-docutils))) + (home-page "https://github.com/ribozz/sphinx-argparse") + (synopsis "Sphinx extension to document argparse commands") + (description "Sphinx extension that automatically documents @code{argparse} +commands and options.") + (license license:expat) + (properties `((python2-variant . ,(delay python2-sphinx-argparse)))))) + +(define-public python2-sphinx-argparse + (let ((base (package-with-python2 (strip-python2-variant + python-sphinx-argparse)))) + (package (inherit base) + (native-inputs + `(("python2-setuptools" ,python2-setuptools) + ,@(package-native-inputs base)))))) -- 2.10.0