sysconfig installation scheme change breaks stuff

Bug #1967920 reported by Dan Streetman
38
This bug affects 5 people
Affects Status Importance Assigned to Milestone
python3.10 (Ubuntu)
Confirmed
Undecided
Unassigned
Jammy
Confirmed
Undecided
Unassigned

Bug Description

the 3.10 version of python in debian and ubuntu appears to have changed its installation scheme from 'posix_prefix' to the debian-specific 'posix_local', which breaks things, for example meson is no longer buildable:
https://launchpadlibrarian.net/595057055/buildlog_ubuntu-jammy-amd64.meson_0.61.2-1_BUILDING.txt.gz

I suspect the problem is an incomplete patching of python to correctly use the 'local' path, as (for example) distutils/setuptools doesn't appear to be using the new 'local' path (in the above build output, search for 'test_meson_installed' to see the failure of meson getting installed to the sysconfig 'scripts' path, which is now '/usr/local/bin' instead of '/usr/bin').

Tags: patch
Revision history for this message
Dan Streetman (ddstreet) wrote :

I suspect this might be a rather critical problem to fix before jammy releases? Just guessing though.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in python3.10 (Ubuntu):
status: New → Confirmed
Revision history for this message
Stefano Rivera (stefanor) wrote :

This is by design. See: https://lists.debian.org/debian-python/2022/03/msg00039.html

There was a Debian bug tracking the effect on Meson, apparently the issue was fixed upstream.
See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009097#32

Revision history for this message
Dan Streetman (ddstreet) wrote :

> This is by design. See: https://lists.debian.org/debian-python/2022/03/msg00039.html

I get that, my point is it doesn't seem to be done correctly.

> There was a Debian bug tracking the effect on Meson, apparently the issue was fixed upstream.
> See: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1009097#32

I think it's more likely this failing test was fixed upstream by:
https://github.com/mesonbuild/meson/commit/54808cd39b765f5553c3c6ae49e5ef14b5290b08

However, that test isn't the real problem; see how upstream meson 'fixed' this:

https://github.com/mesonbuild/meson/commit/a2079939de2d1d271e5ea7f23c3656a73e325728

You sure nothing else needs to be done for this in Debian?

Revision history for this message
Dan Streetman (ddstreet) wrote :

> You sure nothing else needs to be done for this in Debian?

To be specific: are you sure that it's better to leave {base} set to /usr and prefix the various paths with 'local'? Any package build that chooses a different {base} will then still have things put into their custom {base}/local/... which might not be what they expect (certainly wasn't what meson expected)?

Revision history for this message
Benjamin Bach (benjaoming) wrote :

This also affects the layout of new virtual environments, which causes many tools to not locate Python and pip executables.

This breaks popular tools like pre-commit and virtualenvwrapper because they assume that the virtualenv looks like the posix_prefix.

See:
https://github.com/pre-commit/pre-commit/issues/2336
https://github.com/bernardobarreto/virtualenvwrapper/issues/20

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "venv-patch.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.