Package Dependency Management #1888
Replies: 3 comments
-
I guess my question is, the in whatever requirements.bzl file that gets generated by rules_python. Are these packages |
Beta Was this translation helpful? Give feedback.
-
The dependencies are fetched lazily (when they are requested at bazel build time) and this order that you see in the file is just for initializing everything, at which point nothing is fetched. The fetching of the wheels should not affect the runtime since we are just extracting the contents and parsing the METADATA files in the wheels. At runtime all of the wheels will be present and there should be no import errors. |
Beta Was this translation helpful? Give feedback.
-
In Python package installers (pip, poetry, uv, PDM, rules_python), order of installation is not guaranteed or required to be ordered. Indeed uv, is downloading and building them independently in order. So does rules_python. rules_python requires a transitively resolved / locked set of dependencies, which then produces a graph of dependencies, which are then downloaded and installed lazily by rules_python into a runtime location suitable for an interpreter to import them (aka PYTHONPATH). |
Beta Was this translation helpful? Give feedback.
-
Does rules_python have automatic package dependency management (similar to poetry)?
It looks like rules_python spins up a thread for each package is has to download. But if a package has dependencies on other packages, like pandas, will the pandas repository context (the one that gets generated after install_deps in the WORKSPACE) wait until it has the wheel file for numpy (also another repository context) until pandas starts to build? Or how does this work?
Beta Was this translation helpful? Give feedback.
All reactions