Skip to content

Commit

Permalink
🚑Hack contextlib.contextmanager runtime err
Browse files Browse the repository at this point in the history
  • Loading branch information
webknjaz committed Dec 12, 2024
1 parent 8aaaa6b commit bfeaf56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions piptools/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,11 @@ def _create_project_builder(
else _temporary_constraints_file_set_for_pip(upgrade_packages)
)

with maybe_pip_constrained_context, build.env.DefaultIsolatedEnv() as env:
with build.env.DefaultIsolatedEnv() as env:
builder = build.ProjectBuilder.from_isolated_env(env, src_dir, runner)
env.install(builder.build_system_requires)
env.install(builder.get_requires_for_build("wheel"))
with maybe_pip_constrained_context:
env.install(builder.build_system_requires)
env.install(builder.get_requires_for_build("wheel"))
yield builder


Expand Down

0 comments on commit bfeaf56

Please sign in to comment.