Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Aug 31, 2024

Conversation

UebelAndre
Copy link
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
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 bazelbuild:main with commit b97a5d6 Aug 31, 2024
4 checks passed
@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