distutils.sysconfig.get_python_inc() does not include arch specific directory, causing FTBFS

Bug #1094246 reported by Martin Pitt
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre (Ubuntu)
Fix Released
Undecided
Unassigned
python2.7 (Ubuntu)
Fix Released
Undecided
Unassigned
python3.3 (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Packages like calibre call this to determine the include directory:

$ python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc())'
/usr/include/python3.3m

This does not work any more with the multiarch split, as using this directory does not find pyconfig.h; that is shipped in /usr/include/x86_64-linux-gnu/python3.3m/ now.

This is one of several occasions where splitting the include files has caused FTBFS. Would it not be cleaner to ship them all in one arch specific directory if we really must be able to install -dev for several architectures at once?

Revision history for this message
Martin Pitt (pitti) wrote :

Actually calibre uses python2.7, but both 2.7 and 3.3 have the same problem.

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

This bug was fixed in the package calibre - 0.9.11+dfsg-1

---------------
calibre (0.9.11+dfsg-1) unstable; urgency=low

  * New upstream release.
  * Add missing python-cssselect dependency.
  * Add python_multiarch_inc.patch: Use python-config instead of
    sysconfig.get_python_inc(), as the latter does not work with
    multiarch-split include files. (LP: #1094246)

 -- Martin Pitt <email address hidden> Fri, 28 Dec 2012 14:31:49 +0100

Changed in calibre (Ubuntu):
status: New → Fix Released
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

One can also make a second call:
$ python3 -c 'import distutils.sysconfig; print(distutils.sysconfig.get_python_inc(plat_specific=1))'
/usr/include/x86_64-linux-gnu/python3.3m

Revision history for this message
Matthias Klose (doko) wrote :

there is no good solution. moving all headers to the multiarch location will break other autoconf scripts expecting the headers in <prefix>/include.

let's see how many are broken.

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

This bug was fixed in the package python2.7 - 2.7.3-15ubuntu1

---------------
python2.7 (2.7.3-15ubuntu1) raring; urgency=low

  * Build-depend on python:any instead of python.

python2.7 (2.7.3-15) experimental; urgency=low

  * Update to 20130124, taken from the 2.7 branch.
    - Issue #14850: Now a charmap decoder treats U+FFFE as "undefined mapping"
      in any mapping, not only in a Unicode string.
    - Issue #11461: Fix the incremental UTF-16 decoder.
    - Issue #1159051: GzipFile now raises EOFError when reading a corrupted
      file with truncated header or footer.
    - Issue #16992: On Windows in signal.set_wakeup_fd, validate the file
      descriptor argument.
    - Issue #15861: tkinter now correctly works with lists and tuples
      containing strings with whitespaces, backslashes or unbalanced braces.
    - Issue #10527: Use poll() instead of select() for multiprocessing pipes.
    - Issue #9720: zipfile now writes correct local headers for files larger
      than 4 GiB.
    - Issue #16829: IDLE printing no longer fails if there are spaces or other
      special characters in the file path.
    - Issue #13899: \A, \Z, and \B now correctly match the A, Z, and B literals
      when used inside character classes (e.g. '[\A]').
    - Issue #16398: Optimize deque.rotate() so that it only moves pointers
      and doesn't touch the underlying data with increfs and decrefs.
    - Issue #15109: Fix regression in sqlite3's iterdump method where it would
      die with an encoding error if the database contained string values
      containing non-ASCII.
    - Issue #15545: Fix regression in sqlite3's iterdump method where it was
      failing if the connection used a row factory (such as sqlite3.Row) that
      produced unsortable objects.
    - Issue #16953: Fix socket module compilation on platforms with
      HAVE_BROKEN_POLL.
    - Issue #16836: Enable IPv6 support even if IPv6 is disabled on the
      build host.
    - Issue #15539: Fix a number of bugs in Tools/scripts/pindent.py.
  * Backport cross-build support from python3.3.
  * Add pyconfig.h compatibility headers. Closes: #695667. LP: #1094246.
 -- Matthias Klose <email address hidden> Thu, 24 Jan 2013 15:55:46 +0100

Changed in python2.7 (Ubuntu):
status: New → Fix Released
Changed in python3.3 (Ubuntu):
status: New → In Progress
status: In Progress → New
Matthias Klose (doko)
Changed in python3.3 (Ubuntu):
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3.3 - 3.3.1-1ubuntu2

---------------
python3.3 (3.3.1-1ubuntu2) raring; urgency=low

  * Idle updates:
    - Issue #17657: Show full Tk version in IDLE's about dialog.
    - Issue #17613: Prevent traceback when removing syntax colorizer.
    - Issue #1207589: Backwards-compatibility patch for right-click menu.
    - Issue #16887: Now accepts Cancel in tabify/untabify dialog box.
    - Issue #17625: Close the replace dialog after it is used.
    - Issue #14254: Now handles readline correctly across shell restarts.
    - Issue #17614: No longer raises exception when quickly closing a file.
    - Issue #6698: Now opens just an editor window when configured to do so.
    - Issue #8900: Using keyboard shortcuts in IDLE to open a file no longer
      raises an exception.
    - Issue #6649: Fixed missing exit status.
  * Build a libpython3.3-testsuite package. LP: #301629.
  * Add autopkg tests to run the installed testsuite in normal and debug
    mode.
  * Re-enable running the tests during the build.
  * Add pyconfig.h compatibility headers. LP: #1094246.
 -- Matthias Klose <email address hidden> Wed, 10 Apr 2013 23:05:23 +0200

Changed in python3.3 (Ubuntu):
status: Triaged → Fix Released
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.