[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: gnu: python-pytest-6: Fix version string in metadata.
From: |
guix-commits |
Subject: |
01/02: gnu: python-pytest-6: Fix version string in metadata. |
Date: |
Tue, 28 Sep 2021 22:26:10 -0400 (EDT) |
apteryx pushed a commit to branch master
in repository guix.
commit cf2b021e604d48cb415d3f711e37155f7f1e79a3
Author: Maxim Cournoyer <maxim.cournoyer@gmail.com>
AuthorDate: Tue Sep 28 22:11:19 2021 -0400
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.
---
gnu/packages/check.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index d763c92..f3e12ab 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