Skip to content

Commit b6fc2a0

Browse files
authored
fix: Remove --no-build-isolation from pip install command (#2360)
Fixes #2328. In #2126, we discussed and added `--no-build-isolation` to ensure that sdist builds pulled from rules_python supplied dependencies. An unanticipated/misunderstood side-effect of this is that pip will no longer resolve necessary, declared build time dependencies from a package index. That's a significant point of friction for users, and, it's much harder to opt-out of the behavior than to opt-in given the presence of `extra_pip_args`.
1 parent 2b6308c commit b6fc2a0

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,10 @@ A brief description of the categories of changes:
3333
([2310](https://github.com/bazelbuild/rules_python/issues/2310)).
3434
* (publish) The dependencies have been updated to the latest available versions
3535
for the `twine` publishing rule.
36+
* (whl_library) Remove `--no-build-isolation` to allow non-hermetic sdist builds
37+
by default. Users wishing to keep this argument and to enforce more hermetic
38+
builds can do so by passing the argument in
39+
[`pip.parse#extra_pip_args`](https://rules-python.readthedocs.io/en/latest/api/rules_python/python/extensions/pip.html#pip.parse.extra_pip_args)
3640

3741
{#v0-0-0-fixed}
3842
### Fixed

examples/bzlmod/MODULE.bazel.lock

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

python/private/pypi/whl_library.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ def _whl_library_impl(rctx):
230230
# and, allow getting build dependencies from PYTHONPATH, which we
231231
# setup in this repository rule, but still download any necessary
232232
# build deps from PyPI (e.g. `flit_core`) if they are missing.
233-
extra_pip_args.extend(["--no-build-isolation", "--find-links", "."])
233+
extra_pip_args.extend(["--find-links", "."])
234234

235235
args = _parse_optional_attrs(rctx, args, extra_pip_args)
236236

0 commit comments

Comments
 (0)