File: python3.patch

package info (click to toggle)
v-sim 3.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,188 kB
  • sloc: ansic: 115,451; f90: 19,861; python: 2,120; makefile: 1,002; xml: 719; cpp: 688; sh: 23
file content (55 lines) | stat: -rw-r--r-- 2,926 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
Description: Port build system to use Python 3
 Update autoconf build system bits to find Python 3.
Author: Stuart Prescott <stuart@debian.org>
Bug-Debian: https://bugs.debian.org/938803
Last-Update: 2020-01-23

--- a/configure.ac
+++ b/configure.ac
@@ -244,7 +244,7 @@ AC_ARG_ENABLE(python-module, AS_HELP_STR
 if test -n "$enable_python" -a "$enable_python" != "no" ; then
   AM_PATH_PYTHON(2.3.5)
   AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
-  py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
+  py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
   PYTHON_INCLUDES="-I${py_prefix}/include/python${PYTHON_VERSION}"
 
   PKG_CHECK_MODULES(PYGTK, pygobject-2.0 pygtk-2.0, [have_pygtk=yes], [have_pygtk=no])
@@ -423,9 +423,9 @@ if test "x$enable_introspection" = "xyes
   dnl Add Python support for the PythonGI plug-in.
   AM_PATH_PYTHON(2.3)
   AM_CHECK_PYTHON_HEADERS(,[AC_MSG_ERROR(could not find Python headers)])
-  PYTHON_INCLUDES="`python-config --cflags`"
+  PYTHON_INCLUDES="`python3-config --cflags`"
   AC_SUBST(PYTHON_INCLUDES)
-  PYTHON_LIBS="`python-config --libs`"
+  PYTHON_LIBS="`python3-config --libs`"
   AC_SUBST(PYTHON_LIBS)
 
   AC_MSG_CHECKING(for pygobject overrides directory)
@@ -446,9 +446,9 @@ AM_CONDITIONAL([WITH_GOBJECT_INTROSPECTI
 dnl AC_PROG_CC set the CC variable and detect if we use the GNU compiler
 dnl We now append some various CFLAGS depending on platform and choice
 dnl of the user.
-AC_ARG_WITH(strict-cflags, AS_HELP_STRING([--with-strict-cflags], [if set or absent some correctness cflags are appended to the CFLAGS variable. Appended values dependent on the platform and code branch (default on Unix for development is Wall Wno-unused W Werror ansi pedantic-errors).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="no"])
-flags='Wall W ansi'
-flags_cpp='Wall W ansi'
+AC_ARG_WITH(strict-cflags, AS_HELP_STRING([--with-strict-cflags], [if set or absent some correctness cflags are appended to the CFLAGS variable. Appended values dependent on the platform and code branch (default on Unix for development is Wall Wno-unused W Werror pedantic-errors).]), [STRICT_CFLAGS=$withval], [STRICT_CFLAGS="no"])
+flags='Wall W'
+flags_cpp='Wall W'
 if test "$GCC" = "yes" -a "$STRICT_CFLAGS" = "yes"; then
   flags=$flags' Werror Wpedantic std=c99'
   flags_cpp=$flags_cpp' Werror Wpedantic'
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -43,8 +43,8 @@ AC_DEFUN([AM_CHECK_PYTHON_HEADERS],
 [AC_REQUIRE([AM_PATH_PYTHON])
 AC_MSG_CHECKING(for headers required to compile python extensions)
 dnl deduce PYTHON_INCLUDES
-py_prefix=`$PYTHON -c "import sys; print sys.prefix"`
-py_exec_prefix=`$PYTHON -c "import sys; print sys.exec_prefix"`
+py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
+py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
 if test -x "$PYTHON-config"; then
 PYTHON_INCLUDES=`$PYTHON-config --includes 2>/dev/null`
 else