guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#27888] [PATCH 05/18] gnu: python-pytest: Add a minimal variant for


From: Marius Bakke
Subject: [bug#27888] [PATCH 05/18] gnu: python-pytest: Add a minimal variant for bootstrapping.
Date: Mon, 31 Jul 2017 22:07:22 +0200

* 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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]