1
0
Fork 0

Adding upstream version 2.7.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-09 21:21:41 +01:00
parent 155c6d8e29
commit c7660d9548
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
24 changed files with 323 additions and 99 deletions

View file

@ -48,7 +48,7 @@ def _write_state(prefix: Prefix, venv: str, state: object) -> None:
with open(staging, 'w') as state_file:
state_file.write(json.dumps(state))
# Move the file into place atomically to indicate we've installed
os.rename(staging, state_filename)
os.replace(staging, state_filename)
def _hook_installed(hook: Hook) -> bool:
@ -82,6 +82,12 @@ def _hook_install(hook: Hook) -> None:
lang.install_environment(
hook.prefix, hook.language_version, hook.additional_dependencies,
)
if not lang.healthy(hook.prefix, hook.language_version):
raise AssertionError(
f'BUG: expected environment for {hook.language} to be healthy() '
f'immediately after install, please open an issue describing '
f'your environment',
)
# Write our state to indicate we're installed
_write_state(hook.prefix, venv, _state(hook.additional_dependencies))