diff --git a/.github/workflows/ci_python.yml b/.github/workflows/ci_python.yml index 530e3d4e6..c79969591 100644 --- a/.github/workflows/ci_python.yml +++ b/.github/workflows/ci_python.yml @@ -88,7 +88,7 @@ jobs: - name: Build SDK with native extension run: | uv venv --python "${UV_PYTHON:-${{ matrix.python-version }}}" .venv - uv sync --group test --no-group dev --extra claude --extra codex --extra deepagents ${{ matrix.python-version != '3.11' && '--extra harbor' || '' }} ${{ matrix.python-version != '3.14' && '--extra hermes' || '' }} --extra relay --extra runtime + uv sync --group test --no-group dev --extra claude --extra codex --extra deepagents ${{ matrix.python-version != '3.11' && '--extra harbor' || '' }} ${{ matrix.python-version != '3.14' && '--extra hermes-agent' || '' }} --extra relay --extra runtime - name: Run pytest run: | diff --git a/tests/python/test_installed_adapter_discovery.py b/tests/python/test_installed_adapter_discovery.py index 61771b907..253039d1c 100644 --- a/tests/python/test_installed_adapter_discovery.py +++ b/tests/python/test_installed_adapter_discovery.py @@ -94,12 +94,21 @@ def _python_sysconfig_path(python: Path, name: str) -> Path: ) ) +def _create_venv(venv_dir: Path): + # Use `symlinks=True` on Posix systems to work-around for + # https://github.com/astral-sh/uv/issues/8879 + venv.EnvBuilder(with_pip=False, + symlinks=(os.name != "nt")).create(venv_dir) + @pytest.fixture(name="adapter_python") def adapter_python_fixture(tmp_path: Path) -> tuple[Path, Path]: + is_windows = os.name == "nt" adapter_env = tmp_path / "adapter-env" - venv.EnvBuilder(with_pip=False).create(adapter_env) - python = adapter_env / ("Scripts/python.exe" if os.name == "nt" else "bin/python") + + _create_venv(adapter_env) + + python = adapter_env / ("Scripts/python.exe" if is_windows else "bin/python") data_root = _python_sysconfig_path(python, "data") descriptor = _write_descriptor(data_root, "configured.adapter") return python, descriptor @@ -162,7 +171,7 @@ def test_adapter_python_data_directory_replaces_current_data_directory( patch_sysconfig_data(current_data_root) adapter_env = tmp_path / "adapter-env" - venv.EnvBuilder(with_pip=False).create(adapter_env) + _create_venv(adapter_env) adapter_python = adapter_env / ( "Scripts/python.exe" if os.name == "nt" else "bin/python" ) @@ -235,7 +244,7 @@ def test_unset_harness_python_env_uses_sdk_interpreter( def test_adapter_python_data_path_query_times_out(tmp_path: Path): adapter_env = tmp_path / "slow-adapter-env" - venv.EnvBuilder(with_pip=False).create(adapter_env) + _create_venv(adapter_env) adapter_python = adapter_env / ( "Scripts/python.exe" if os.name == "nt" else "bin/python" )