diff options
Diffstat (limited to 'gnu/packages/python-check.scm')
| -rw-r--r-- | gnu/packages/python-check.scm | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index 676dae54304..b8aaef9b77b 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> | 2 | ;;; Copyright © 2019 Ricardo Wurmus <rekado@elephly.net> |
| 3 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> | 3 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
| 4 | ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> | 4 | ;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> |
| 5 | ;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> | ||
| 5 | ;;; | 6 | ;;; |
| 6 | ;;; This file is part of GNU Guix. | 7 | ;;; This file is part of GNU Guix. |
| 7 | ;;; | 8 | ;;; |
| @@ -226,11 +227,27 @@ testing framework.") | |||
| 226 | (base32 | 227 | (base32 |
| 227 | "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12")))) | 228 | "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12")))) |
| 228 | (build-system python-build-system) | 229 | (build-system python-build-system) |
| 229 | (arguments '(#:tests? #f)) ; one test fails; can't find virtualenv | 230 | (arguments |
| 231 | `(#:phases | ||
| 232 | (modify-phases %standard-phases | ||
| 233 | ;; Reference the virtualenv executable directly, to avoid the need | ||
| 234 | ;; for PYTHONPATH, which gets cleared when instantiating a new | ||
| 235 | ;; virtualenv with pytest-virtualenv. | ||
| 236 | (add-after 'unpack 'patch-virtualenv-executable | ||
| 237 | (lambda* (#:key inputs #:allow-other-keys) | ||
| 238 | (let* ((virtualenv (assoc-ref inputs "python-virtualenv")) | ||
| 239 | (virtualenv-bin (string-append virtualenv | ||
| 240 | "/bin/virtualenv"))) | ||
| 241 | (substitute* "pytest_virtualenv.py" | ||
| 242 | (("^DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE.*$") | ||
| 243 | (format #f "DEFAULT_VIRTUALENV_FIXTURE_EXECUTABLE = '~a'" | ||
| 244 | virtualenv-bin))) | ||
| 245 | #t)))))) | ||
| 230 | (propagated-inputs | 246 | (propagated-inputs |
| 231 | `(("python-virtualenv" ,python-virtualenv) | 247 | `(("python-pytest-shutil" ,python-pytest-shutil) |
| 232 | ("python-pytest-shutil" ,python-pytest-shutil) | ||
| 233 | ("python-pytest-fixture-config" ,python-pytest-fixture-config))) | 248 | ("python-pytest-fixture-config" ,python-pytest-fixture-config))) |
| 249 | (inputs | ||
| 250 | `(("python-virtualenv" ,python-virtualenv))) | ||
| 234 | (native-inputs | 251 | (native-inputs |
| 235 | `(("python-mock" ,python-mock) | 252 | `(("python-mock" ,python-mock) |
| 236 | ("python-pytest" ,python-pytest) | 253 | ("python-pytest" ,python-pytest) |
