sysconfig paths are incorrect

Bug #1739628 reported by Timmmm
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
python2.7 (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

On Ubuntu 17.10:

$ ls /usr/include/python2.7
abstract.h code.h funcobject.h marshal.h pgenheaders.h pymem.h
....
$ ls /usr/local/include/python2.7
ls: cannot access '/usr/local/include/python2.7': No such file or directory
$ python -c "import sysconfig; print(sysconfig.get_path('include'))"
/usr/local/include/python2.7

Definitely wrong.

Python is such a massive pain to integrate with - I actually switched from CMake's FindPythonLibs() which is heuristic-based and very unreliable to sysconfig - "surely python itself knows where it is installed?" I thought. Ha. Of course not. /rant

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

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

Changed in python2.7 (Ubuntu):
status: New → Confirmed
Revision history for this message
Steven Clarkson (sclarkson) wrote :

I've been using this as a workaround.

from distutils.sysconfig
print(distutils.sysconfig.get_python_inc())

Revision history for this message
Alex Coplan (alecop) wrote :

FWIW I can reproduce this on Ubuntu 18.04, 20.04, and 22.04 and on multiple architectures (x86_64 and aarch64).

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.