Skip to content

fix: Fix whl_library in bazel vendor mode #3096

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

omar-droubi
Copy link

Resolves #3079

  • Added PYTHONHOME to whl_library execution environment. Without it, the python interpreter is getting confused where it's running from when bazel --vendor_dir is used
  • In _get_toolchain_unix_cflags, the real path for python is used instead of the symlink.

- Added PYTHONHOME to whl_library execution enviornment. Without
it the python interpretter is getting confused where it's running
from when bazel --vendor_dir is used. PYTHONHOME will be aquired
by running python in isolated mode, and the sys.prefix queried.
- In _get_toolchain_unix_cflags, the real path for python is used
instead of the symlink.
@omar-droubi
Copy link
Author

Hi @aignas, with regards to the tests, the bug this PR resolves occurs when there is a "bazel clean --expunge" between the "bazel vendor" and the "bazel build" commands. Is it possible to update the "integration_test_bzlmod_ubuntu_vendor" with a "bazel clean" ? I am not sure how impactful that would be on the CI performance.

integration_test_bzlmod_ubuntu_vendor:
<<: *reusable_build_test_all
name: "examples/bzlmod: bazel vendor"
working_directory: examples/bzlmod
platform: ubuntu2204
shell_commands:
- "bazel clean --expunge"
- "bazel vendor --vendor_dir=./vendor //..."
- "bazel clean --expunge"
- "bazel build --vendor_dir=./vendor //..."
- "rm -rf ./vendor"

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.

PIP Installation failure when using partially vendorred dependencies using bazel vendor
1 participant
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy