wolfi-dev / os

Main package repository for production Wolfi images
Other
819 stars 248 forks source link

py3.12-pip does not know that it depends on /usr/bin/python being python-3.12. #15124

Open smoser opened 7 months ago

smoser commented 7 months ago

This issue came to light when we hit https://github.com/wolfi-dev/os/issues/14880 .

package py3.12-pip installs /usr/bin/pip which is an easyinstall script with a shebang of #!/usr/bin/python

the py3.12-pip does register a dependency on python3.12 as generated by melange sca. That is due to it having files installed into /usr/lib/python3.12/site-packages .

The problem is that the /usr/bin/pip program actually depends on /usr/bin/python3.12. if /usr/bin/python is provided by /usr/bin/python3.11, then the program will error.

smoser commented 7 months ago

The problem is around /usr/bin/ not being namespaced to a python version.

I think the solution here is to have py3.12-pip install /usr/bin/pip that has a '#!/usr/bin/python3.12' shebang.

This looks like it may end up requiring a '-base' version of any python package that can be installed with python3.12 and python3.11 that also provides a /usr/bin/.

smoser commented 5 months ago

this will hopefuly be covered under https://github.com/smoser/wolfi-os/tree/python-dev