Open jkaye2012 opened 2 months ago
The correct way to solve this could be to start using techniques outlined in https://blog.engflow.com/2024/08/20/migrating-to-bazel-modules-aka-bzlmod---repo-names-and-rules_pkg/
Sorry, I don't see how that has anything to do with the problem at hand. This should function without bzlmod and it's not a problem with rules_pkg, but with rules_python
Ah sorry, I might be missing something about the original problem. I was reading this blog post and the topics seemed to be related - packaging files.
π bug report
Affected Rule
py_wheel
Is this a regression?
Doubtful
Description
When building a wheel using
py_wheel
, third-party pip requirements are being installed into an incorrect directory, preventing them from being properly installed/used in Python environments.π¬ Minimal Reproduction
π₯ Exception or Error
The wheel builds as usual, and looks (at least mostly) correct. However, upon installing the wheel, we see the following:
regression_harness
was in fact installed, and is available, but the third-party transitive dependencies are within a nested site-packages directory within the site-packages.Of course, this means that they're not available within the environment, as that directory is not part of the PYTHONPATH.
I have tried stripping the
site-packages
prefix when building the wheel, but this makes the wheel file invalid as it will contain multiple.dist-info
files.Am I doing something incorrectly? This seems like a bug to me, but I can't imagine that others wouldn't have seen this.
π Your Environment
Operating System:
Output of
bazel version
:Rules_python version:
Anything else relevant?