[Python-modules-commits] r24548 - in packages/libapache2-mod-python/trunk/debian (3 files)

adejong at users.alioth.debian.org adejong at users.alioth.debian.org
Sun May 26 12:16:44 UTC 2013


    Date: Sunday, May 26, 2013 @ 12:16:40
  Author: adejong
Revision: 24548

  * FTBFS: switch configure.in to pkg-config to configure Python. This fixes
    discovery with multiarch Python. Taken from the Ubuntu packaging
    (LP: #1098597).

Added:
  packages/libapache2-mod-python/trunk/debian/patches/04_autoconf_python_multiarch.dpatch
Modified:
  packages/libapache2-mod-python/trunk/debian/changelog
  packages/libapache2-mod-python/trunk/debian/patches/00list

Modified: packages/libapache2-mod-python/trunk/debian/changelog
===================================================================
--- packages/libapache2-mod-python/trunk/debian/changelog	2013-05-26 09:41:07 UTC (rev 24547)
+++ packages/libapache2-mod-python/trunk/debian/changelog	2013-05-26 12:16:40 UTC (rev 24548)
@@ -1,14 +1,16 @@
 libapache2-mod-python (3.3.1-10) UNRELEASED; urgency=low
 
   [ Arthur de Jong ]
-  * Update Vcs-Browser field.
   * Switch to dh_python2 based on the patch in Ubuntu. (Closes: #616858,
     LP: #788514)
+  * FTBFS: switch configure.in to pkg-config to configure Python. This fixes
+    discovery with multiarch Python. Taken from the Ubuntu packaging
+    (LP: #1098597).
 
   [ Jakub Wilk ]
   * Use canonical URIs for Vcs-* fields.
 
- -- Jakub Wilk <jwilk at debian.org>  Sun, 05 May 2013 16:01:09 +0200
+ -- Arthur de Jong <adejong at debian.org>  Sun, 26 May 2013 14:14:59 +0200
 
 libapache2-mod-python (3.3.1-9) unstable; urgency=low
 

Modified: packages/libapache2-mod-python/trunk/debian/patches/00list
===================================================================
--- packages/libapache2-mod-python/trunk/debian/patches/00list	2013-05-26 09:41:07 UTC (rev 24547)
+++ packages/libapache2-mod-python/trunk/debian/patches/00list	2013-05-26 12:16:40 UTC (rev 24548)
@@ -1,4 +1,5 @@
 01_configure
 02_makefile
 03_includes
+04_autoconf_python_multiarch
 10_bts521965

Added: packages/libapache2-mod-python/trunk/debian/patches/04_autoconf_python_multiarch.dpatch
===================================================================
--- packages/libapache2-mod-python/trunk/debian/patches/04_autoconf_python_multiarch.dpatch	                        (rev 0)
+++ packages/libapache2-mod-python/trunk/debian/patches/04_autoconf_python_multiarch.dpatch	2013-05-26 12:16:40 UTC (rev 24548)
@@ -0,0 +1,75 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 04_autoconf_python_multiarch.dpatch by  <ubuntu at server-e76384a2-51cb-4595-9b66-9ed53c1e0c44.canonistack>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+##
+## DP: Drop custom Python detection and use pkg-config instead. This fixes
+## DP: FTBFS due to multiarch include paths. Not sure if this should be
+## DP: fowrarded or not (see https://lists.ubuntu.com/archives/ubuntu-devel/2013-January/036291.html)
+## DP: Author: Robie Basak <robie.basak at canonical.com>
+## DP: Bug-Ubuntu: https://launchpad.net/bugs/1098597
+## DP: Forwarded: no
+
+ at DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' libapache2-mod-python-3.3.1~/configure.in libapache2-mod-python-3.3.1/configure.in
+--- libapache2-mod-python-3.3.1~/configure.in	2013-01-10 16:35:51.000000000 +0000
++++ libapache2-mod-python-3.3.1/configure.in	2013-01-10 16:35:51.000000000 +0000
+@@ -223,39 +223,9 @@
+ # set python std library variable
+ AC_SUBST(LIBS)
+ 
+-PyLIBP=${PY_STD_LIB}
+-PyLIBPL=${PyLIBP}/config
+-PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
+-PyLIBS=`grep "^LIB[[SMC]]=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
+-PyMODLIBS=`grep "^LOCALMODLIBS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
+-PyFRAMEWORK=`grep "^PYTHONFRAMEWORK=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
+-PyFRAMEWORKDIR=`grep "^PYTHONFRAMEWORKDIR=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   ' | awk '{print $1}'`
+-
+-save_LDFLAGS="$LDFLAGS"
+-save_LIBS="$LIBS"
+-if test "$PyFRAMEWORKDIR" != "no-framework"; then
+-  if test -n "$PyFRAMEWORK"; then
+-    PyPYTHONLIBS="-framework $PyFRAMEWORK"
+-    LDFLAGS="${LDFLAGS} -Wl,-framework,Python"
+-  fi
+-else
+-  LDFLAGS="${LDFLAGS} -L${PyLIBPL}"
+-  AC_CHECK_LIB(python${PyVERSION}, Py_NewInterpreter,
+-             [ PyPYTHONLIBS="-lpython${PyVERSION}" ],
+-             [ LDFLAGS="$save_LDFLAGS"
+-               if test -f ${PyLIBPL}/libpython${PyVERSION}.a; then
+-                  PyPYTHONLIBS=${PyLIBPL}/libpython${PyVERSION}.a
+-               else
+-                  AC_ERROR(Can not link to python)
+-               fi
+-              ], 
+-              [ ${PyLIBS} ${PyMODLIBS} ] )
+-fi
+-LIBS="$save_LIBS"
+-
+ # (actually this check already just happened above)
+ AC_MSG_CHECKING(what libraries Python was linked with) 
+-PY_LIBS="${PyPYTHONLIBS} ${PyLIBS} ${PyMODLIBS}"
++PY_LIBS=`${PYTHON_BIN}-config --libs`
+  
+ ## XXX this is a small work around for a weird RedHat problem
+ ## erase -lieee from library list
+@@ -268,15 +238,13 @@
+ 
+ AC_MSG_CHECKING(linker flags used to link Python)
+ AC_SUBST(LDFLAGS)
+-PyLFS=`grep "^LINKFORSHARED=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
+-PyLDFLAGS=`grep "^LDFLAGS=" ${PyLIBPL}/Makefile | cut -f2 -d= | tr '\011\012\015' '   '`
+-LDFLAGS="${LDFLAGS} ${PyLFS} ${PyLDFLAGS}"
++PY_LDFLAGS=`${PYTHON_BIN}-config --ldflags`
+ LDFLAGS="${LDFLAGS} ${PY_LDFLAGS}"
+ AC_MSG_RESULT($PY_LDFLAGS)
+ 
+ AC_MSG_CHECKING(where Python include files are)
+ AC_SUBST(INCLUDES)
+-PY_INCLUDES="-I${PyEXEC_INSTALLDIR}/include/python${PyVERSION}"
++PY_INCLUDES=`${PYTHON_BIN}-config --includes`
+ INCLUDES="${INCLUDES} ${AP_INCLUDES} ${PY_INCLUDES}"
+ AC_MSG_RESULT($PY_INCLUDES)
+ 




More information about the Python-modules-commits mailing list