From 40a729a0e6f1d660b942241416c1e2c567616d4d Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 15 May 2022 20:20:08 -0400 Subject: gnu: Fix the build of wicd. Fixes . * gnu/packages/check.scm (python2-pytest-cov, python2-freezegun): Define without package-with-python2. * gnu/packages/python-xyz.scm (python2-babel): Likewise. * gnu/packages/time.scm (python2-dateutil): Likwise. --- gnu/packages/check.scm | 62 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 61 insertions(+), 1 deletion(-) (limited to 'gnu/packages/check.scm') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 8e6576208c..8c161a4a4f 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1178,6 +1178,38 @@ distributed testing in both @code{load} and @code{each} modes. It also supports coverage of subprocesses.") (license license:expat))) +(define-public python2-pytest-cov + (package + (name "python2-pytest-cov") + (version "2.8.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-cov" version)) + (sha256 + (base32 "0avzlk9p4nc44k7lpx9109dybq71xqnggxb9f4hp0l64pbc44ryc")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; Options taken from tox.ini. + ;; TODO: make "--restructuredtext" tests pass. They currently fail + ;; with "Duplicate implicit target name". + (invoke "python" "./setup.py" "check" + "--strict" "--metadata")))))) + (propagated-inputs + (list python2-coverage python2-pytest)) + (home-page "https://github.com/pytest-dev/pytest-cov") + (synopsis "Pytest plugin for measuring coverage") + (description + "Pytest-cov produces coverage reports. It supports centralised testing and +distributed testing in both @code{load} and @code{each} modes. It also +supports coverage of subprocesses.") + (license license:expat))) + (define-public python-pytest-httpserver (package (name "python-pytest-httpserver") @@ -2935,7 +2967,35 @@ time by mocking the datetime module.") (license license:asl2.0))) (define-public python2-freezegun - (package-with-python2 python-freezegun)) + (package + (name "python2-freezegun") + (version "0.3.14") + (source + (origin + (method url-fetch) + (uri (pypi-uri "freezegun" version)) + (sha256 + (base32 "0al75mk829j1izxi760b7yjnknjihyfhp2mvi5qiyrxb9cpxwqk2")))) + (build-system python-build-system) + (native-inputs + (list python2-mock python2-pytest)) + (propagated-inputs + (list python2-six python2-dateutil)) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + ;; The tests are normally executed via `make test`, but the PyPi + ;; package does not include the Makefile. + (replace 'check + (lambda _ + (invoke "pytest" "-vv")))))) + (home-page "https://github.com/spulec/freezegun") + (synopsis "Test utility for mocking the datetime module") + (description + "FreezeGun is a library that allows your python tests to travel through +time by mocking the datetime module.") + (license license:asl2.0))) (define-public python-flexmock (package -- cgit v1.2.3