diff --git a/src/build/env.py b/src/build/env.py index e6d22b5d..6304a762 100644 --- a/src/build/env.py +++ b/src/build/env.py @@ -92,7 +92,9 @@ def __enter__(self) -> IsolatedEnv: :return: The isolated build environment """ - self._path = tempfile.mkdtemp(prefix='build-env-') + # ``realpath`` is used to prevent warning from being emitted that + # the venv location has moved on Windows. + self._path = os.path.realpath(tempfile.mkdtemp(prefix='build-env-')) try: # use virtualenv when available (as it's faster than venv) if _should_use_virtualenv():