You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a ticket to tidy up and do feature work to ensure that the pip bzlmod extension can generate a lock file that is os,arch independent. The rough list of steps that we need to take are:
Create a host toolchain that can be passed to the python_interpreter_target. We need to ensure that the label that is passed to the whl_library repo rule is the same no matter the platform.
Remove the requirement file selection based on the host platform and instead generate the repos for all available requirement files. Because the platform specific requirements files may have different versions of packages, we have to go all the way through and go with the approach outlined in exp: multi-arch whl_library in bzlmod #1625 in the general case to be fully correct.
To make the pip extension more maintainable we might also need to have:
config_setting values for (pyXY, os, cpu) triples so that we can more easily create the required aliases in the hub repository.
Making the dependency resolution aware of the python abi.
The above would make the number of layers of indirection fewer and hopefully make it easier to extend the code in general.
This general work may be related fix some aspects of #310 for bzlmod.
Original issue that spurred a feature on bazel itself: bazelbuild/bazel#19154. The motivation for restarting the effort is the fact that maintaining a lock file that has os,arch specific sections is hard and requires updating the lock file by running bazel on a number of platforms and this just does not scale in the long term.
This is a ticket to tidy up and do feature work to ensure that the
pipbzlmod extension can generate a lock file that isos,archindependent. The rough list of steps that we need to take are:hosttoolchain that can be passed to thepython_interpreter_target. We need to ensure that the label that is passed to thewhl_libraryrepo rule is the same no matter the platform.To make the
pipextension more maintainable we might also need to have:pyXY,os,cpu) triples so that we can more easily create the required aliases in the hub repository.The above would make the number of layers of indirection fewer and hopefully make it easier to extend the code in general.
This general work may be related fix some aspects of #310 forbzlmod.Original issue that spurred a feature on
bazelitself: bazelbuild/bazel#19154. The motivation for restarting the effort is the fact that maintaining a lock file that hasos,archspecific sections is hard and requires updating the lock file by runningbazelon a number of platforms and this just does not scale in the long term.