commit | b97a5d61138666a434ed69b480a175e5c03d9356 | [log] [tgz] |
---|---|---|
author | UebelAndre <github@uebelandre.com> | Sat Aug 31 14:58:59 2024 -0700 |
committer | GitHub <noreply@github.com> | Sat Aug 31 21:58:59 2024 +0000 |
tree | e03abc7464662a5b7cc9e7f90ee01b66ba5a290d | |
parent | 54c9fab03af56869ac5b36fb2ab614a63a40a7ab [diff] |
fix(py_wheel): Avoid reliance on bash in `py_wheel` macro. (#2171) 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.
This repository is the home of the core Python rules -- py_library
, py_binary
, py_test
, py_proto_library
, and related symbols that provide the basis for Python support in Bazel. It also contains package installation rules for integrating with PyPI and other indices.
Documentation for rules_python is at https://rules-python.readthedocs.io and in the Bazel Build Encyclopedia.
Examples live in the examples directory.
The core rules are stable. Their implementation is subject to Bazel's backward compatibility policy. This repository aims to follow semantic versioning.
The Bazel community maintains this repository. Neither Google nor the Bazel team provides support for the code. However, this repository is part of the test suite used to vet new Bazel releases. See How to contribute page for information on our development workflow.
For detailed documentation, see https://rules-python.readthedocs.io
See Bzlmod support for more details.