From d1db939d5aca5170d0f24fcb5da27542f5fc6e07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bern=C3=A1t=20G=C3=A1bor?= Date: Sun, 18 Feb 2024 15:48:29 -0800 Subject: [PATCH] Test with Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bernát Gábor --- .github/workflows/check.yml | 2 +- src/tox_uv/_venv.py | 6 +++--- tox.ini | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index b4cdffb..85c434a 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -27,7 +27,7 @@ jobs: - "3.8" os: - ubuntu-latest -# - windows-latest # not yet supported + - windows-latest - macos-latest steps: - name: setup python for tox diff --git a/src/tox_uv/_venv.py b/src/tox_uv/_venv.py index c739a27..920dbc5 100644 --- a/src/tox_uv/_venv.py +++ b/src/tox_uv/_venv.py @@ -90,7 +90,7 @@ def _get_python(self, base_python: list[str]) -> PythonInfo | None: # noqa: PLR @property def uv(self) -> str: - return str(Path(sys.executable).parent / "uv") + return str(Path(sys.executable).parent / f"uv{'.exe' if sys.platform == 'win32' else ''}") @property def venv_dir(self) -> Path: @@ -104,11 +104,11 @@ def environment_variables(self) -> dict[str, str]: def create_python_env(self) -> None: base = self.base_python - cmd = [self.uv, "venv", "-p", base.version_dot] + cmd = [self.uv, "venv", "-p", base.version_dot, "-v"] if self.conf["uv_seed"]: cmd.append("--seed") cmd.append(str(self.venv_dir)) - outcome = self.execute(cmd, stdin=StdinSource.OFF, run_id="venv", show=False) + outcome = self.execute(cmd, stdin=StdinSource.OFF, run_id="venv", show=None) outcome.assert_success() @property diff --git a/tox.ini b/tox.ini index 77ca003..fba7074 100644 --- a/tox.ini +++ b/tox.ini @@ -18,6 +18,8 @@ package = wheel wheel_build_env = .pkg extras = test +pass_env = + PATH set_env = COVERAGE_FILE = {toxworkdir}{/}.coverage.{envname} commands =