bazel-contrib / bazel-contrib/rules_foreign_cc
Issue building with system Python in MacOS Monterey 12.4
- Dominant language
- Starlark
- Stars
- 737
- Forks
- 270
- PR merge metrics
- No merged PRs in 30d
Description
In MacOS Monterey 12.4, `python` is [no longer a command](https://developer.apple.com/documentation/macos-release-notes/macos-12_3-release-notes) that's installed by default; only `python3`. When building MySQL through rules_foreign_cc, I get a `python not found` based on this call https://github.com/bazelbuild/rules_foreign_cc/blob/main/foreign_cc/private/framework/toolchains/macos_commands.bzl#L255.
I wasn't sure how to provide Bazel with an alias for `python` during this build script step; so I ended up forking this repo and modifying the line.
If there's a best practice that I missed, PLMK, I'm new to Bazel and very new to `rules_foreign_cc`.
Thank you for your consideration.
Contributor guide
Research direction
Start in foreign_cc/private/framework/toolchains/macos_commands.bzl at the call around line 255, and inspect how the macOS toolchain invokes Python during the MySQL build. Verify the affected rules_foreign_cc build completes on macOS Monterey 12.4 without requiring a default `python` command.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- macos, python
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100