gnu: ansible-core: Fix build.

* gnu/packages/admin.scm (ansible-core):
[phases]{set-HOME}: New phases.
{check}: Remove setting HOME from phase.
[native-inputs]: Remove python-pytest; add python-pytest-8.

Change-Id: Ifeb238a4f058d6618d1ce79f0275332bed1f007f
This commit is contained in:
Sharlatan Hellseher 2026-01-24 21:07:46 +00:00
parent 8307dd6ea4
commit 8e2fa683f6
No known key found for this signature in database
GPG key ID: 76D727BFF62CD2B5

View file

@ -3285,6 +3285,10 @@ specified directories.")
import re import re
sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0]) sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
"))))) ")))))
(add-before 'build 'set-HOME
(lambda _
;; Otherwise Ansible fails to create its config directory.
(setenv "HOME" "/tmp")))
(add-after 'install 'replace-symlinks (add-after 'install 'replace-symlinks
(lambda _ (lambda _
;; Replace symlinks with duplicate copies of the ansible ;; Replace symlinks with duplicate copies of the ansible
@ -3316,8 +3320,6 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
(replace 'check (replace 'check
(lambda* (#:key inputs outputs tests? test-flags #:allow-other-keys) (lambda* (#:key inputs outputs tests? test-flags #:allow-other-keys)
(when tests? (when tests?
;; Otherwise Ansible fails to create its config directory.
(setenv "HOME" "/tmp")
;; The test suite needs to be run with 'ansible-test', which ;; The test suite needs to be run with 'ansible-test', which
;; does some extra environment setup. Taken from ;; does some extra environment setup. Taken from
;; https://raw.githubusercontent.com/ansible/ansible/\ ;; https://raw.githubusercontent.com/ansible/ansible/\
@ -3328,7 +3330,7 @@ sys.argv[0] = re.sub(r'\\.([^/]*)-real$', r'\\1', sys.argv[0])
openssl openssl
python-mock python-mock
python-pycryptodome python-pycryptodome
python-pytest python-pytest-8
python-pytest-forked python-pytest-forked
python-pytest-mock python-pytest-mock
python-pytest-xdist python-pytest-xdist