From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55872) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dcGz1-0000KD-Ch for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dcGyy-0001i1-Hs for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33059) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dcGyy-0001hu-EN for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dcGyy-0004oh-9L for guix-patches@gnu.org; Mon, 31 Jul 2017 16:08:04 -0400 Subject: [bug#27888] [PATCH 05/18] gnu: python-pytest: Add a minimal variant for bootstrapping. Resent-Message-ID: From: Marius Bakke Date: Mon, 31 Jul 2017 22:07:22 +0200 Message-Id: <20170731200735.28019-5-mbakke@fastmail.com> In-Reply-To: <20170731200735.28019-1-mbakke@fastmail.com> References: <20170731200735.28019-1-mbakke@fastmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: 27888@debbugs.gnu.org * gnu/packages/python.scm (python-pytest-bootstrap, python2-pytest-bootstrap): New variables. (python-pytest, python2-pytest): Inherit from bootstrap variants. (python-six, python-hypothesis, python-pytest-runner, python-mccabe)[native-inputs]: Use PYTHON-PYTEST-BOOTSTRAP instead of PYTHON-PYTEST. --- gnu/packages/python.scm | 42 ++++++++++++++++++++++++++---------------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 18067d388..2fe74a4e4 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -1187,7 +1187,7 @@ password storage.") (zero? (system* "py.test" "-v"))))))) (native-inputs `(("python-py" ,python-py) - ("python-pytest" ,python-pytest))) + ("python-pytest" ,python-pytest-bootstrap))) (home-page "http://pypi.python.org/pypi/six/") (synopsis "Python 2 and 3 compatibility utilities") (description @@ -1886,9 +1886,9 @@ code introspection, and logging.") (define-public python2-py (package-with-python2 python-py)) -(define-public python-pytest +(define python-pytest-bootstrap (package - (name "python-pytest") + (name "python-pytest-bootstrap") (version "3.0.7") (source (origin @@ -1899,6 +1899,25 @@ code introspection, and logging.") "1asc4b2nd2a4f0g3r12y97rslq5wliji7b73wwkvdrm5s7mrc1mp")))) (build-system python-build-system) (arguments + `(#:tests? #f)) + (propagated-inputs + `(("python-py" ,python-py))) + (home-page "http://pytest.org") + (synopsis "Python testing library") + (description + "Pytest is a testing tool that provides auto-discovery of test modules +and functions, detailed info on failing assert statements, modular fixtures, +and many external plugins.") + (license license:expat))) + +(define-public python2-pytest-bootstrap + (package-with-python2 python-pytest-bootstrap)) + +(define-public python-pytest + (package + (inherit python-pytest-bootstrap) + (name "python-pytest") + (arguments `(#:phases (modify-phases %standard-phases (add-before 'check 'disable-invalid-tests @@ -1913,22 +1932,13 @@ code introspection, and logging.") "(reason=\"Assumes that /usr exists.\")\n " line))) #t))))) - (propagated-inputs - `(("python-py" ,python-py))) (native-inputs `(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`. ("bash" ,bash) ("python-hypothesis" ,python-hypothesis) ("python-nose" ,python-nose) ("python-mock" ,python-mock))) - (home-page "http://pytest.org") - (synopsis "Python testing library") - (description - "Pytest is a testing tool that provides auto-discovery of test modules -and functions, detailed info on failing assert statements, modular fixtures, -and many external plugins.") - (properties `((python2-variant . ,(delay python2-pytest)))) - (license license:expat))) + (properties `((python2-variant . ,(delay python2-pytest-bootstrap)))))) (define-public python2-pytest (let ((base (package-with-python2 @@ -1998,7 +2008,7 @@ supports coverage of subprocesses.") (string-append "version = \"" ,version "\""))) #t))))) (native-inputs - `(("python-pytest" ,python-pytest) + `(("python-pytest" ,python-pytest-bootstrap) ("python-setuptools-scm" ,python-setuptools-scm))) (home-page "https://github.com/pytest-dev/pytest-runner") (synopsis "Invoke py.test as a distutils command") @@ -6722,7 +6732,7 @@ PEP 8.") "0yr08a36h8lqlif10l4xcikbbig7q8f41gqywir7rrvnv3mi4aws")))) (build-system python-build-system) (native-inputs - `(("python-pytest" ,python-pytest) + `(("python-pytest" ,python-pytest-bootstrap) ("python-pytest-runner" ,python-pytest-runner))) (home-page "https://github.com/flintwork/mccabe") (synopsis "McCabe checker, plugin for flake8") @@ -9774,7 +9784,7 @@ Amazon Web Services (AWS) API.") (build-system python-build-system) (native-inputs `(("python-flake8" ,python-flake8) - ("python-pytest" ,python-pytest))) + ("python-pytest" ,python-pytest-bootstrap))) (synopsis "Library for property based testing") (description "Hypothesis is a library for testing your Python code against a much larger range of examples than you would ever want to write by hand. It’s -- 2.13.3