mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-06 19:01:54 +00:00
fix(dev-python): name the requires-python hand-over outside the .env key space
#1347 passed the supported Python range to the remote install.sh as INFINITO_PYTHON_REQUIRES. Every INFINITO_* name is a key of the generated .env, so test_every_referenced_infinito_key_is_registered fails on main for this one, which no registry entry can carry: its value is derived from pyproject.toml's requires-python, the single source, and a default in default.env would be a second copy of the range. The task environment and the script now call it DEV_PYTHON_REQUIRES; behaviour is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b9d9e5dd54
commit
0bdb14cc1d
3 files changed
+8
-8
No files matched your search
@@ -24,7 +24,7 @@ def _call(
|
||||
Args:
|
||||
snippet: bash code evaluated after sourcing; sees ``args`` as ``"$@"``.
|
||||
args: positional arguments handed to the snippet.
|
||||
requires: value for ``INFINITO_PYTHON_REQUIRES``; ``None`` leaves it
|
||||
requires: value for ``DEV_PYTHON_REQUIRES``; ``None`` leaves it
|
||||
unset so the script reads the repository's ``pyproject.toml``.
|
||||
|
||||
Returns:
|
||||
@@ -33,10 +33,10 @@ def _call(
|
||||
env = {
|
||||
key: value
|
||||
for key, value in os.environ.items()
|
||||
if key != "INFINITO_PYTHON_REQUIRES"
|
||||
if key != "DEV_PYTHON_REQUIRES"
|
||||
}
|
||||
if requires is not None:
|
||||
env["INFINITO_PYTHON_REQUIRES"] = requires
|
||||
env["DEV_PYTHON_REQUIRES"] = requires
|
||||
return subprocess.run(
|
||||
["bash", "-c", f'source "$1"; shift; {snippet}', "bash", str(SCRIPT), *args],
|
||||
capture_output=True,
|
||||
@@ -210,7 +210,7 @@ class TestBoundsFromRequiresPython(unittest.TestCase):
|
||||
for task in load_yaml_str(read_text(str(ROLE_TASKS)))
|
||||
if "ansible.builtin.script" in task
|
||||
)
|
||||
expression = task["environment"]["INFINITO_PYTHON_REQUIRES"]
|
||||
expression = task["environment"]["DEV_PYTHON_REQUIRES"]
|
||||
|
||||
def lookup(name: str, term: str) -> str:
|
||||
return {
|
||||
|
||||
Reference in new issue
Block a user