diff options
Diffstat (limited to 'gnu/packages/python-check.scm')
-rw-r--r-- | gnu/packages/python-check.scm | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 676dae5430..15cf9138d4 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -109,17 +110,17 @@ interactions, which will update them to correspond to the new API.") (define-public python-pytest-checkdocs (package (name "python-pytest-checkdocs") - (version "1.2.0") + (version "1.2.2") (source (origin (method url-fetch) (uri (pypi-uri "pytest-checkdocs" version)) (sha256 - (base32 - "07c27cdjcw6jph5kbgpxchrvwlps4ggwb2j6m7y64imnik0asrq8")))) + (base32 "0j6j1gvj6x451y3qsx4xbaq9p1w9gg3mwk7n0w80cy8vdyjkngb0")))) (build-system python-build-system) (propagated-inputs - `(("python-importlib-metadata" ,python-importlib-metadata))) + `(("python-importlib-metadata" ,python-importlib-metadata) + ("python-more-itertools" ,python-more-itertools))) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm))) (home-page "https://github.com/jaraco/pytest-checkdocs") @@ -226,11 +227,27 @@ testing framework.") (base32 "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12")))) (build-system python-build-system) - (arguments '(#:tests? #f)) ; one test fails; can't find virtualenv + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Reference the virtualenv executable directly, to avoid the need + ;; for PYTHONPATH, which gets cleared when instantiating a new + ;; virtualenv with pytest-virtualenv. + (add-after 'unpack 'patch-virtualenv-executable + (lambda* (#:key inputs #:allow-other-keys) + (let* ((virtualenv (assoc-ref inputs "python-virtualenv")) + (virtualenv-bin (string-append virtualenv + "/bin/virtualenv"))) + (substitute* "pytest_virtualenv.py" + (("^DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE.*$") + (format #f "DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = '~a'" + virtualenv-bin))) + #t)))))) (propagated-inputs - `(("python-virtualenv" ,python-virtualenv) - ("python-pytest-shutil" ,python-pytest-shutil) + `(("python-pytest-shutil" ,python-pytest-shutil) ("python-pytest-fixture-config" ,python-pytest-fixture-config))) + (inputs + `(("python-virtualenv" ,python-virtualenv))) (native-inputs `(("python-mock" ,python-mock) ("python-pytest" ,python-pytest) |