Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ Other changes:
)
```
Fixes [#3676](https://github.com/bazel-contrib/rules_python/issues/3676).
* (pypi) Fixes wheel extraction on hosts without python installed,
Fixes [#3712](https://github.com/bazel-contrib/rules_python/issues/3712).

{#v2-0-0-added}
### Added
Expand Down
9 changes: 4 additions & 5 deletions python/private/pypi/whl_library.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -306,9 +306,6 @@ def _whl_library_impl(rctx):
extra_pip_args = []
extra_pip_args.extend(rctx.attr.extra_pip_args)

# Manually construct the PYTHONPATH since we cannot use the toolchain here
environment = _create_repository_execution_environment(rctx, python_interpreter, logger = logger)

whl_path = None
sdist_filename = None
if rctx.attr.whl_file:
Expand Down Expand Up @@ -377,7 +374,8 @@ def _whl_library_impl(rctx):
python = python_interpreter,
op = op_tmpl.format(name = rctx.attr.name, requirement = rctx.attr.requirement.split(" ", 1)[0]),
arguments = args,
environment = environment,
# Manually construct the PYTHONPATH since we cannot use the toolchain here
environment = _create_repository_execution_environment(rctx, python_interpreter, logger = logger),
srcs = rctx.attr._python_srcs,
quiet = rctx.attr.quiet,
timeout = rctx.attr.timeout,
Expand Down Expand Up @@ -414,7 +412,8 @@ def _whl_library_impl(rctx):
python_interpreter = python_interpreter,
args = args,
whl_path = whl_path,
environment = environment,
# Manually construct the PYTHONPATH since we cannot use the toolchain here
environment = _create_repository_execution_environment(rctx, python_interpreter, logger = logger),
Comment thread
aignas marked this conversation as resolved.
Outdated
logger = logger,
)

Expand Down