Archived
1
0
Fork 0

gnu: python-hy: Report version.

* gnu/packages/python-xyz.scm (python-hy)[arguments]<#:phases>: Add
set-version and remove-installed-build-scripts.

Signed-off-by: Nicolas Goaziou <mail@nicolasgoaziou.fr>
This commit is contained in:
Jack Hill 2023-03-16 18:24:23 -04:00 committed by Maxim Cournoyer
parent 55ede56b38
commit cd451a3971
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -58,7 +58,7 @@
;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl> ;;; Copyright © 2015, 2018 Pjotr Prins <pjotr.guix@thebird.nl>
;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org> ;;; Copyright © 2019, 2020 Brett Gilio <brettg@gnu.org>
;;; Copyright © 2019 Sam <smbaines8@gmail.com> ;;; Copyright © 2019 Sam <smbaines8@gmail.com>
;;; Copyright © 2019 Jack Hill <jackhill@jackhill.us> ;;; Copyright © 2019, 2023 Jack Hill <jackhill@jackhill.us>
;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net> ;;; Copyright © 2019, 2020, 2021, 2022 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com> ;;; Copyright © 2019, 2020 Alex Griffin <a@ajgrf.com>
;;; Copyright © 2019, 2020, 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com> ;;; Copyright © 2019, 2020, 2021, 2022 Pierre Langlois <pierre.langlois@gmx.com>
@ -15309,17 +15309,29 @@ with a new public API, and RPython support.")
(base32 "1czhh7s81sg0nrnf4zv0ydqi4f7s6sywf4ks4fd59vpx441ca39v")))) (base32 "1czhh7s81sg0nrnf4zv0ydqi4f7s6sywf4ks4fd59vpx441ca39v"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
'(#:phases (list
(modify-phases %standard-phases #:phases
(replace 'check #~(modify-phases %standard-phases
(lambda* (#:key tests? #:allow-other-keys) ;; Hy includes a script that writes a version.py file that Hy uses to
(when tests? ;; report its version. That script uses information from the git
(invoke "python" "-m" "pytest" "-k" ;; repository or the HY_VERSION environment variable. Therefore,
(string-append ; skip some failed tests ;; these phases set HY_VERSION and then remove the support scripts
"not test_sys_executable" ;; which get installed in the root of the output.
" and not test_circular_macro_require" (add-after 'unpack 'set-version
" and not test_macro_require" (lambda _
" and not test_requires_pollutes_core")))))))) (setenv "HY_VERSION" #$version)))
(add-after 'install 'remove-installed-build-scripts
(lambda _
(delete-file-recursively (string-append #$output "/get_version"))))
(replace 'check
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(invoke "python" "-m" "pytest" "-k"
(string-append ; skip some failed tests
"not test_sys_executable"
" and not test_circular_macro_require"
" and not test_macro_require"
" and not test_requires_pollutes_core"))))))))
(native-inputs (native-inputs
(list python-pytest-7.1 python-wheel)) (list python-pytest-7.1 python-wheel))
(propagated-inputs (propagated-inputs