From 747ea85bc953c82684713e5b683a17947aad7937 Mon Sep 17 00:00:00 2001 From: Sharlatan Hellseher Date: Thu, 7 Nov 2024 16:53:36 +0000 Subject: [PATCH] gnu: python-pytest-virtualenv: Update to 1.8.0. * gnu/packages/python-check.scm (python-pytest-virtualenv): Update to 1.8.0. Use G-expressions. [build-system]: Swap to pyproejct-build-system. [inputs]: Remove python-virtualenv. [propagated-inputs]: Add python-importlib-metadata and python-virtualenv. [native-inputs]: Remove python-mock; add python-setuptools and python-wheel. Change-Id: I92170b0e272dceb1e2e22bf0b1c675aed99986d4 --- gnu/packages/python-check.scm | 51 +++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm index c9164251f77d9fe6d1cb3db9be2b2b6140479977..e643806371cf850d70e830189e68940f427b82e4 100644 --- a/gnu/packages/python-check.scm +++ b/gnu/packages/python-check.scm @@ -1516,37 +1516,42 @@ testing framework.") (define-public python-pytest-virtualenv (package (name "python-pytest-virtualenv") - (version "1.7.0") + (version "1.8.0") (source (origin (method url-fetch) (uri (pypi-uri "pytest-virtualenv" version)) (sha256 (base32 - "03w2zz3crblj1p6i8nq17946hbn3zqp9z7cfnifw47hi4a4fww12")))) - (build-system python-build-system) + "1ig1jwgs89r9vxdr12fgxvv9r05bnf5d18lxyn13xciivwwi16al")))) + (build-system pyproject-build-system) (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 - (list python-pytest-shutil python-pytest-fixture-config)) - (inputs - (list python-virtualenv)) + (list + #:test-flags #~(list "--ignore=tests/integration/") + #: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 #$(this-package-input "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))))))))) (native-inputs - (list python-mock python-pytest python-setuptools-git)) + (list python-pytest + python-setuptools + python-setuptools-git + python-wheel)) + (propagated-inputs + (list python-importlib-metadata + python-pytest-shutil + python-pytest-fixture-config + python-virtualenv)) (home-page "https://github.com/manahl/pytest-plugins") (synopsis "Virtualenv fixture for py.test") (description "This package provides a virtualenv fixture for the py.test