gnu: python-pytest-6: Fix version via setuptools-scm.
* gnu/packages/check.scm (python-pytest-6): Fix indentation. [phases]{fix-version}: Rename to... {pretend-version}: ... this. Use the supported setuptools-scm mechanism to manually fix the version string, as suggested upstream.
This commit is contained in:
parent
e3f172b1ad
commit
dac3ba0d40
1 changed files with 3 additions and 5 deletions
|
@ -981,21 +981,19 @@ standard library.")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(add-after 'unpack 'fix-version
|
(add-before 'build 'pretend-version
|
||||||
;; The version string is usually derived via setuptools-scm, but
|
;; The version string is usually derived via setuptools-scm, but
|
||||||
;; without the git metadata available, the version string is set to
|
;; without the git metadata available, the version string is set to
|
||||||
;; '0.0.0'.
|
;; '0.0.0'.
|
||||||
(lambda _
|
(lambda _
|
||||||
(substitute* "setup.py"
|
(setenv "SETUPTOOLS_SCM_PRETEND_VERSION" ,version)))
|
||||||
(("setup\\(\\)")
|
|
||||||
(format #f "setup(version=~s)" ,version)))))
|
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda* (#:key (tests? #t) #:allow-other-keys)
|
(lambda* (#:key (tests? #t) #:allow-other-keys)
|
||||||
(setenv "TERM" "dumb") ;attempt disabling markup tests
|
(setenv "TERM" "dumb") ;attempt disabling markup tests
|
||||||
(if tests?
|
(if tests?
|
||||||
(invoke "pytest" "-vv" "-k"
|
(invoke "pytest" "-vv" "-k"
|
||||||
(string-append
|
(string-append
|
||||||
;; This test involve the /usr directory, and fails.
|
;; This test involves the /usr directory, and fails.
|
||||||
" not test_argcomplete"
|
" not test_argcomplete"
|
||||||
;; These test do not honor the isatty detection and
|
;; These test do not honor the isatty detection and
|
||||||
;; fail.
|
;; fail.
|
||||||
|
|
Reference in a new issue