On 26. 05. 22 6:27, Neal Gompa wrote:
On Thu, May 26, 2022 at 12:10 AM Owen Taylor otaylor@redhat.com wrote:
[ At Miro's request, resending this to python-devel so the discussion can be public ]
Hi Miro -
When rebuilding a package to include in a Flatpak, we want to install *everything* under prefix=/app - that includes Python modules. (Paths will be adjusted properly when running the Flatpak.)
For years, the way we did that is by installing a /usr/lib64/python3.10/distutils/distutils.cfg:
[install] prefix=/app ===
This is part of the flatpak-rpm-macros package that gets installed in the buildroot for Flatpak rebuilds
In Fedora 36, this no longer works for 'pip install' - it seems that pip unconditionally uses 'sysconfig' rather than 'distutils' to determine install paths for Python >= 3.10.
I see that you filed https://github.com/pypa/pip/issues/10647 which landed in pip for pip-22, but Fedora 36 / pip-21 this isn't present? And in any case, that seems like it's something for 'sudo pip install' rather than package installation. I actually don't really follow how the Python macros are getting things installed into /usr/lib rather than /usr/local/lib.
Any advice about how we can make the installation into /app work? Hopefully in a future-proof way...
What's stopping us from upgrading pip in F36? It's packaged separately from Python itself already...
Well, technically probably the *Updates policy*, but we could carefully evaluate the impact of such upgrade and eventually decide to do it.
However, it would make no difference standalone (see my longer previous reply to Owen).