From 97ed675718b948319e6f6e51f2d577971bea1176 Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Thu, 13 Apr 2023 15:51:05 -0400 Subject: gnu: python-pytest-fork: Update to 1.6.0. * gnu/packages/check.scm (python-pytest-fork): Update to 1.6.0. [build-system]: Use pyproject-build-system. [arguments]: Replace disable-setuptools-scm phase with pretend-version. [native-inputs]: Remove input labels. Add python-setuptools-scm. (python-pytest-forked-next): Delete variable. (python-pytest-xdist-next): Replace python-pytest-forked-next with python-pytest-forked. --- gnu/packages/check.scm | 49 +++++++++++++------------------------------------ 1 file changed, 13 insertions(+), 36 deletions(-) (limited to 'gnu') diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 990c6d52df..96450b47bd 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -1693,7 +1693,7 @@ (define-public python-pytest-xdist-next (base32 "1psf5dqxvc38qzxvc305mkg5xpdmdkbkkfiyqlmdnkgh7z5dx025")))) (propagated-inputs (list python-execnet python-pytest - python-pytest-forked-next)))) + python-pytest-forked)))) (define-public python-pytest-timeout (package @@ -1728,7 +1728,7 @@ (define-public python-pytest-timeout (define-public python-pytest-forked (package (name "python-pytest-forked") - (version "1.3.0") + (version "1.6.0") (source (origin (method git-fetch) ;for tests @@ -1738,29 +1738,23 @@ (define-public python-pytest-forked (file-name (git-file-name name version)) (sha256 (base32 - "1aip4kx50ynvykl7kq2mlbsi82vx701dvb8mm64lhp69bbv105rc")))) - (build-system python-build-system) + "1y93q914gwf0nshql1qix6sj826q163b04vw17zmwhsnbv00c2d3")))) + (build-system pyproject-build-system) (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'disable-setuptools-scm - (lambda _ - (substitute* "setup.py" - (("use_scm_version=True") - (format #f "version=~s" ,version)) - (("setup_requires=\\['setuptools_scm'\\],.*") - "")))) - (replace 'check - (lambda* (#:key inputs outputs tests? #:allow-other-keys) - (when tests? - (add-installed-pythonpath inputs outputs) - (invoke "pytest" "-vv"))))))) + (list #:phases + #~(modify-phases %standard-phases + (add-before 'build 'pretend-version + ;; The version string is usually derived via setuptools-scm, + ;; but without the git metadata available, the version string + ;; is set to '0.0.0'. + (lambda _ + (setenv "SETUPTOOLS_SCM_PRETEND_VERSION" #$version)))))) (native-inputs ;; XXX: The bootstrap variant of Pytest is used to ensure the ;; 'hypothesis' plugin is not in the environment (due to ;; ), which would cause the test suite ;; to fail (see: https://github.com/pytest-dev/pytest-forked/issues/54). - `(("python-pytest" ,python-pytest-bootstrap))) + (list python-pytest-bootstrap python-setuptools-scm)) (home-page "https://github.com/pytest-dev/pytest-forked") (synopsis "Pytest plugin to run tests in isolated forked subprocesses") (description "This package provides a Pytest plugin which enables running @@ -1769,23 +1763,6 @@ (define-public python-pytest-forked side-effects (such as setting environment variables).") (license license:expat))) -(define-public python-pytest-forked-next - (package - (inherit python-pytest-forked) - (name "python-pytest-forked") - (version "1.4.0") - (source - (origin - (method git-fetch) ;for tests - (uri (git-reference - (url "https://github.com/pytest-dev/pytest-forked") - (commit (string-append "v" version)))) - (file-name (git-file-name name version)) - (sha256 - (base32 - "0j9bbjny7h3b4fig6l26f26c697r67mm62fzdd9m9rqyy2bmnqjs")))) - (native-inputs (list python-pytest-bootstrap python-setuptools-scm)))) - (define-public python-scripttest (package (name "python-scripttest") -- cgit v1.2.3