Skip to content

Commit

Permalink
In util.project_wheel_metadata, solicit the isolation setting from th…
Browse files Browse the repository at this point in the history
…e environment, allowing builders to affect the isolation behavior. Closes pypa#556.
  • Loading branch information
jaraco committed Mar 31, 2024
1 parent 1e67c06 commit 6e818ad
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/build/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import os
import pathlib
import tempfile

Expand All @@ -21,7 +22,7 @@ def _project_wheel_metadata(builder: ProjectBuilder) -> importlib.metadata.Packa

def project_wheel_metadata(
source_dir: StrPath,
isolated: bool = True,
isolated: bool = os.environ.get('BUILD_ENVIRONMENT', 'isolated') == 'isolated',
*,
runner: SubprocessRunner = pyproject_hooks.quiet_subprocess_runner,
) -> importlib.metadata.PackageMetadata:
Expand All @@ -34,7 +35,9 @@ def project_wheel_metadata(
:param source_dir: Project source directory
:param isolated: Whether or not to run invoke the backend in the current
environment or to create an isolated one and invoke it
there.
there. Defaults to True (isolated), but with
``BUILD_ENVIRONMENT=current`` set, the default
is False.
:param runner: An alternative runner for backend subprocesses
"""

Expand Down

0 comments on commit 6e818ad

Please sign in to comment.