deadsnakes / issues

Issues for https://launchpad.net/~deadsnakes/+archive/ubuntu/ppa
86 stars 6 forks source link

Python include path reported in sysconfig module seems incorrect on python 3.10 and 3.11 builds #237

Closed samypr100 closed 1 year ago

samypr100 commented 1 year ago

description

After installing python3.10-dev or python3.11-dev, noticed that sysconfig module on python 3.10 and python 3.11 builds shows the wrong include, and platinclude path being /usr/local/include/python3.X when the actual location of the headers is in /usr/include/python3.X since /usr/local/include/python3.X is actually empty.

> python3.10 -c 'from sysconfig import get_paths as gp; print(gp()["include"])'
/usr/local/include/python3.10

^ Should output /usr/include/python3.10

> python3.11 -c 'from sysconfig import get_paths as gp; print(gp()["include"])'
/usr/local/include/python3.11

^ Should output /usr/include/python3.11

This seems like a non-issue on python 3.9 and below as it reports the correct path, namely /usr/include/python3.X for deadsnakes builds. I checked python 3.8 as well and it was correct.

> python3.9 -c 'from sysconfig import get_paths as gp; print(gp()["include"])'
/usr/include/python3.9

Similarly, on the python provided by upstream debian (e.g. jammy), Python 3.10 reports correctly /usr/include/python3.X, so it seems something isolated to deadsnakes build for some reason.

os information

lsb_release -a

# Tried it on bionic, focal, and jammy (only 3.11) docker containers

uname -a

# Linux aabbccddffaa 5.15.49-linuxkit #1 SMP Tue Sep 13 07:51:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
asottile commented 1 year ago

yeah this is probably some weirdness with the sysconfig rewrite that happened in 3.10

asottile commented 1 year ago

although, the debian patch here kinda looks like a mistake cc @stefanor -- I expect a unix_local scheme to have local for include as well (it has it for headers)

https://salsa.debian.org/cpython-team/python3/-/blob/d82914577a0f04cfff06d0dc7a75df12379d9c71/debian/patches/distutils-install-layout.diff#L82-83

stefanor commented 1 year ago

https://bugs.debian.org/1007966 ?

Fixed in https://salsa.debian.org/cpython-team/python3/-/commit/7e712c8f1bbdc562ed228adb6f675eb277034576 And with an update to python3-stdlib-extensions, because distutils is shipped separately.

asottile commented 1 year ago

I've copied the sysconfig dicts from debian -- this should resolve in a few hours once launchpad finishes building