[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
22/51: gnu: python-pytest: Update to 5.3.2.
From: |
guix-commits |
Subject: |
22/51: gnu: python-pytest: Update to 5.3.2. |
Date: |
Fri, 24 Jan 2020 14:48:16 -0500 (EST) |
mbakke pushed a commit to branch core-updates
in repository guix.
commit c5d399090e2a3f5a742fcdf4e514f0f8ab6fe491
Author: Marius Bakke <address@hidden>
AuthorDate: Wed Jan 15 22:03:00 2020 +0100
gnu: python-pytest: Update to 5.3.2.
* gnu/packages/check.scm (python-pytest): Update to 5.3.2.
[propagated-inputs]: Add PYTHON-WCWIDTH and PYTHON-PACKAGING-BOOTSTRAP.
[native-inputs]: Add PYTHON-XMLSCHEMA.
[arguments]: Support overriding check phase with #:tests?.
(python2-pytest): Stay on version 4.4.2.
(python2-pytest-bootstrap): Inherit from PYTHON2-PYTEST instead of
PYTHON-PYTEST-BOOTSTRAP.
* gnu/packages/python-xyz.scm (python-packaging-bootstrap): New public
variable.
---
gnu/packages/check.scm | 96 ++++++++++++++++++++++++++++++++-------------
gnu/packages/python-xyz.scm | 11 ++++++
2 files changed, 79 insertions(+), 28 deletions(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 684721c..c28e488 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -64,6 +64,7 @@
#:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages time)
+ #:use-module (gnu packages xml)
#:use-module (guix utils)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
@@ -763,35 +764,40 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "4.4.2")
+ (version "5.3.2")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2"))))
+ "1yi51ckkiywszz0qp67jisxzcp54acf57wqr3ysgk457nlai4mvb"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "pytest" "-vv" "-k"
- (string-append
- ;; These tests involve the /usr directory, and fails.
- "not test_remove_dir_prefix"
- " and not test_argcomplete"
- ;; This test tries to override PYTHONPATH, and
- ;; subsequently fails to locate the test libraries.
- " and not test_collection")))))))
+ (lambda* (#:key (tests? #t) #:allow-other-keys)
+ (if tests?
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ ;; These tests involve the /usr directory, and fails.
+ "not test_remove_dir_prefix"
+ " and not test_argcomplete"
+ ;; This test tries to override PYTHONPATH, and
+ ;; subsequently fails to locate the test libraries.
+ " and not test_collection"))
+ (format #t "test suite not run~%"))
+ #t)))))
(propagated-inputs
`(("python-atomicwrites" ,python-atomicwrites)
("python-attrs" ,python-attrs-bootstrap)
("python-more-itertools" ,python-more-itertools)
+ ("python-packaging" ,python-packaging-bootstrap)
("python-pluggy" ,python-pluggy)
("python-py" ,python-py)
- ("python-six" ,python-six-bootstrap)))
+ ("python-six" ,python-six-bootstrap)
+ ("python-wcwidth" ,python-wcwidth)))
(native-inputs
`(;; Tests need the "regular" bash since 'bash-final' lacks `compgen`.
("bash" ,bash)
@@ -799,7 +805,8 @@ standard library.")
("python-nose" ,python-nose)
("python-mock" ,python-mock)
("python-pytest" ,python-pytest-bootstrap)
- ("python-setuptools-scm" ,python-setuptools-scm)))
+ ("python-setuptools-scm" ,python-setuptools-scm)
+ ("python-xmlschema" ,python-xmlschema)))
(home-page "https://docs.pytest.org/en/latest/")
(synopsis "Python testing library")
(description
@@ -809,15 +816,38 @@ and many external plugins.")
(license license:expat)
(properties `((python2-variant . ,(delay python2-pytest))))))
+;; Pytest 4.x are the last versions that support Python 2.
(define-public python2-pytest
- (let ((pytest (package-with-python2
- (strip-python2-variant python-pytest))))
- (package
- (inherit pytest)
- (propagated-inputs
- `(("python2-funcsigs" ,python2-funcsigs)
- ("python2-pathlib2" ,python2-pathlib2)
- ,@(package-propagated-inputs pytest))))))
+ (package
+ (inherit (strip-python2-variant python-pytest))
+ (name "python2-pytest")
+ (version "4.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest" version))
+ (sha256
+ (base32
+ "18w38kjnffdcrlbw6ny6dksgxai6x9bxpjs2m6klqmb8hfzjkcb2"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:python ,python-2
+ ,@(package-arguments python-pytest)))
+ (propagated-inputs
+ `(("python-atomicwrites" ,python2-atomicwrites)
+ ("python-attrs" ,python2-attrs-bootstrap)
+ ("python-funcsigs" ,python2-funcsigs)
+ ("python-more-itertools" ,python2-more-itertools)
+ ("python-pathlib2" ,python2-pathlib2)
+ ("python-pluggy" ,python2-pluggy)
+ ("python-py" ,python2-py)
+ ("python-six" ,python2-six-bootstrap)))
+ (native-inputs
+ `(("bash" ,bash) ;tests require 'compgen'
+ ("python-hypothesis" ,python2-hypothesis)
+ ("python-nose" ,python2-nose)
+ ("python-mock" ,python2-mock)
+ ("python-pytest" ,python2-pytest-bootstrap)
+ ("python-setuptools-scm" ,python2-setuptools-scm)))))
(define-public python-pytest-bootstrap
(package
@@ -828,13 +858,23 @@ and many external plugins.")
(properties `((python2-variant . ,(delay python2-pytest-bootstrap))))))
(define-public python2-pytest-bootstrap
- (let ((pytest (package-with-python2
- (strip-python2-variant python-pytest-bootstrap))))
- (package (inherit pytest)
- (propagated-inputs
- `(("python2-funcsigs" ,python2-funcsigs-bootstrap)
- ("python2-pathlib2" ,python2-pathlib2-bootstrap)
- ,@(package-propagated-inputs pytest))))))
+ (hidden-package
+ (package/inherit
+ python2-pytest
+ (name "python2-pytest-bootstrap")
+ (arguments
+ (substitute-keyword-arguments (package-arguments python2-pytest)
+ ((#:tests? _ #f) #f)))
+ (native-inputs
+ `(("python-setuptools-scm" ,python2-setuptools-scm)))
+ (propagated-inputs
+ `(("python-atomicwrites" ,python2-atomicwrites)
+ ("python-attrs" ,python2-attrs-bootstrap)
+ ("python-funcsigs" ,python2-funcsigs-bootstrap)
+ ("python-more-itertools" ,python2-more-itertools)
+ ("python-pathlib2" ,python2-pathlib2-bootstrap)
+ ("python-pluggy" ,python2-pluggy)
+ ("python-py" ,python2-py))))))
(define-public python-pytest-cov
(package
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 9f37da9..618049e 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -13121,6 +13121,17 @@ information.")
;; licenses.
(license (list license:asl2.0 license:bsd-2))))
+;; A variant with minimal dependencies, for bootstrapping Pytest.
+(define-public python-packaging-bootstrap
+ (hidden-package
+ (package/inherit
+ python-packaging
+ (name "python-packaging-bootstrap")
+ (native-inputs '())
+ (propagated-inputs
+ `(("python-pyparsing" ,python-pyparsing)))
+ (arguments '(#:tests? #f)))))
+
(define-public python2-packaging
(package-with-python2 python-packaging))
- 07/51: gnu: python-setuptools-scm: Update to 3.3.3., (continued)
- 07/51: gnu: python-setuptools-scm: Update to 3.3.3., guix-commits, 2020/01/24
- 05/51: gnu: python-scandir: Update to 1.10.0., guix-commits, 2020/01/24
- 09/51: gnu: python-typing: Update to 3.7.4.1., guix-commits, 2020/01/24
- 02/51: gnu: Python: Update to 3.8.1., guix-commits, 2020/01/24
- 19/51: gnu: python-attrs: Update to 19.3.0., guix-commits, 2020/01/24
- 18/51: gnu: python-pyparsing: Update to 2.4.6., guix-commits, 2020/01/24
- 16/51: gnu: python-sorted-containers: Disable tests., guix-commits, 2020/01/24
- 20/51: gnu: python-hypothesis: Update to 5.1.5., guix-commits, 2020/01/24
- 14/51: gnu: python-more-itertools: Update to 8.1.0., guix-commits, 2020/01/24
- 21/51: gnu: python-pluggy: Update to 0.13.1., guix-commits, 2020/01/24
- 22/51: gnu: python-pytest: Update to 5.3.2.,
guix-commits <=
- 32/51: gnu: python-dateutil: Update to 2.8.1., guix-commits, 2020/01/24
- 34/51: gnu: network-manager: Fix build with Python 3.8., guix-commits, 2020/01/24
- 35/51: gnu: python-freezegun: Update to 0.3.13., guix-commits, 2020/01/24
- 41/51: gnu: python-freezegun: Update to 0.3.14., guix-commits, 2020/01/24
- 37/51: gnu: python-six: Update to 1.14.0., guix-commits, 2020/01/24
- 38/51: gnu: python-hypothesis: Update to 5.3.0., guix-commits, 2020/01/24
- 36/51: gnu: python-cffi: Update to 1.13.2., guix-commits, 2020/01/24
- 40/51: gnu: python-pycairo: Update to 1.19.0., guix-commits, 2020/01/24
- 27/51: gnu: python-mako: Do not use pytest nose compatibility layer., guix-commits, 2020/01/24
- 30/51: gnu: python-pygobject: Update to 3.34.0., guix-commits, 2020/01/24