Skip to content

fix(py_wheel): Avoid reliance on bash in py_wheel macro.#2171

Merged
rickeylev merged 1 commit intobazel-contrib:mainfrom
UebelAndre:wheel
Aug 31, 2024
Merged

fix(py_wheel): Avoid reliance on bash in py_wheel macro.#2171
rickeylev merged 1 commit intobazel-contrib:mainfrom
UebelAndre:wheel

Conversation

@UebelAndre
Copy link
Copy Markdown
Contributor

@UebelAndre UebelAndre commented Aug 31, 2024

While trying to modernize an older repo I tried building wheels on windows and ran into a failure:

Windows Subsystem for Linux has no installed distributions.

Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install <Distro>' to install.

Distributions can also be installed by visiting the Microsoft Store:
https://aka.ms/wlstore
Errorcode: Bash/Service/CreateInstance/GetDefaultDistro/WSL_E_DEFAULT_DISTRO_NOT_FOUND

This appears to be caused by the py_wheel_dist rule which gets caught by //.... This target should be considered a side-effect/optional target of py_wheel. To fix:

  1. Mark the target as manual, so it's only built when explicitly requested.
  2. Implement copying to the directory with a Python program instead of shell, so bash
    isn't required.

Copy link
Copy Markdown
Collaborator

@rickeylev rickeylev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks!

@rickeylev rickeylev added this pull request to the merge queue Aug 31, 2024
Merged via the queue into bazel-contrib:main with commit b97a5d6 Aug 31, 2024
@UebelAndre UebelAndre deleted the wheel branch August 31, 2024 22:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants