summary refs log tree commit diff
path: root/gnu/packages/check.scm
diff options
context:
space:
mode:
authorMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-09-28 22:11:19 -0400
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2021-09-28 22:11:19 -0400
commitcf2b021e604d48cb415d3f711e37155f7f1e79a3 (patch)
tree1f94b194bcf886acf6cb396195c1f9b1b85697bf /gnu/packages/check.scm
parente91c9ce32e6fa3a4759d83a0d7ae7d49d813668d (diff)
downloadguix-cf2b021e604d48cb415d3f711e37155f7f1e79a3.tar.gz
gnu: python-pytest-6: Fix version string in metadata.
The PKG-INFO file generated previously would have '0.0.0' as the version
string, causing problems in other packages specifying requirements such as
'pytest>=6'.

* gnu/packages/check.scm (python-pytest-6)[phases]{fix-version}: New phase.
Diffstat (limited to 'gnu/packages/check.scm')
-rw-r--r--gnu/packages/check.scm8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index d763c92f3b..f3e12ab16f 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -1014,6 +1014,14 @@ and many external plugins.")
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (add-after 'unpack 'fix-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 _
+             (substitute* "setup.py"
+               (("setup\\(\\)")
+                (format #f "setup(version=~s)" ,version)))))
          (replace 'check
            (lambda* (#:key (tests? #t) #:allow-other-keys)
              (setenv "TERM" "dumb")     ;attempt disabling markup tests