Package: nlopt
Version: 2.3+dfsg-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu raring ubuntu-patch

Dear Maintainer,

This patch fixes an Ubuntu FTBS in Raring and will likely be
important as Python versions increase (and include paths change).

*** /tmp/tmpuRL2VS/bug_body
In Ubuntu, the attached patch was applied to achieve the following:

  * Detect Python includes paths using '$PYTHON-config --includes'
    debian/patches.04-python-includes.patch


Thanks for considering the patch.


-- System Information:
Debian Release: wheezy/sid
  APT prefers precise-updates
  APT policy: (500, 'precise-updates'), (500, 'precise-security'), (500, 
'precise-proposed'), (500, 'precise'), (100, 'precise-backports')
Architecture: amd64 (x86_64)

Kernel: Linux 3.8.0-0-generic (SMP w/32 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -Nru nlopt-2.3+dfsg/debian/patches/04-python-includes.patch nlopt-2.3+dfsg/debian/patches/04-python-includes.patch
--- nlopt-2.3+dfsg/debian/patches/04-python-includes.patch	1969-12-31 17:00:00.000000000 -0700
+++ nlopt-2.3+dfsg/debian/patches/04-python-includes.patch	2013-01-07 13:11:54.000000000 -0700
@@ -0,0 +1,16 @@
+Index: nlopt-2.3+dfsg/configure.ac
+===================================================================
+--- nlopt-2.3+dfsg.orig/configure.ac	2013-01-07 13:10:33.142903763 -0700
++++ nlopt-2.3+dfsg/configure.ac	2013-01-07 13:11:44.192255658 -0700
+@@ -163,9 +163,9 @@
+ AM_PATH_PYTHON([],[have_python=yes],[have_python=no])
+ if test $have_python = yes; then
+   AC_MSG_CHECKING([for Python include directory])
+-  pinc=`echo "import distutils.sysconfig; print distutils.sysconfig.get_python_inc()" | $PYTHON - 2>/dev/null`
++  pinc="`$PYTHON-config --includes`"
+   AC_MSG_RESULT([${pinc:-unknown}])
+-  test -n "$pinc" && PYTHON_INCLUDES="-I$pinc"
++  test -n "$pinc" && PYTHON_INCLUDES="$pinc"
+   save_CPPFLAGS=$CPPFLAGS
+   CPPFLAGS="$CPPFLAGS $PYTHON_INCLUDES"
+   AC_CHECK_HEADER([Python.h], [], [AC_MSG_WARN([disabling Python wrappers]) 
diff -Nru nlopt-2.3+dfsg/debian/patches/series nlopt-2.3+dfsg/debian/patches/series
--- nlopt-2.3+dfsg/debian/patches/series	2012-12-12 03:37:27.000000000 -0700
+++ nlopt-2.3+dfsg/debian/patches/series	2013-01-07 13:11:05.000000000 -0700
@@ -3,3 +3,4 @@
 01_manpage_fixes.patch
 02_spelling_fixes.patch
 03_guile_fix_deprecated_calls.patch
+04-python-includes.patch

Reply via email to