me
/
guix
Archived
1
0
Fork 0

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.
master
Maxim Cournoyer 2021-09-28 22:11:19 -04:00
parent e91c9ce32e
commit cf2b021e60
No known key found for this signature in database
GPG Key ID: 1260E46482E63562
1 changed files with 8 additions and 0 deletions

View File

@ -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