Comment 1 for bug 1477759

Revision history for this message
Steve Langasek (vorlon) wrote :

This is a bug in either python3.5 or in dh-python, I'm not sure which. dh-python inspects sysconfig for the interpreter version to determine the filenames it should use. The code it runs is:

$ python3.5
>>> import sysconfig as s
>>> print("__SEP__".join(i or "" for i in s.get_config_vars("SOABI","MULTIARCH","INCLUDEPY","LIBPL","LDLIBRARY")))
cpython-35m-x86_64-linux-gnu__SEP__x86_64-linux-gnu__SEP__/usr/include/python3.5m__SEP__${prefix}/lib/python3.5/config-3.5m-x86_64-linux-gnu__SEP__libpython3.5m.so
>>>

on python3.4, this gives:

$ python3.4
>>> import sysconfig as s
>>> print("__SEP__".join(i or "" for i in s.get_config_vars("SOABI","MULTIARCH","INCLUDEPY","LIBPL","LDLIBRARY")))
cpython-34m__SEP__x86_64-linux-gnu__SEP__/usr/include/python3.4m__SEP__/usr/lib/python3.4/config-3.4m-x86_64-linux-gnu__SEP__libpython3.4m.so
>>>

The difference between 3.4 and 3.5 is that the multiarch string is now included as *part of* the SOABI variable; so concatenating the two variables to form the filename means that the architecture name is doubled when it shouldn't be.

This is bound to cause misbuilds of a number of python extensions, which will need to be rebuilt once this is fixed.

Assuming the python3.5 behavior is a deliberate change that should not be reverted, it seems it should be a simple thing to check that the multiarch value isn't a substring of the SOABI.