[gimp] configure: some Python test cleanup/improvements.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] configure: some Python test cleanup/improvements.
- Date: Sun, 28 Jul 2019 16:53:41 +0000 (UTC)
commit 521ff83cba8899bf74790f2d5e389d878c655cdc
Author: Jehan <jehan girinstud io>
Date: Wed Jul 24 14:02:41 2019 +0200
configure: some Python test cleanup/improvements.
In particular, when header check fails, Python option is disabled.
Also let's use pkg-config to search for the Python include directory.
The reason is that include/python{version} is not always
true. On my system in particular, python3.7 was in `include/python3.7m`.
configure.ac | 8 +-
m4macros/python3dev.m4 | 2 +-
m4macros/pythondev.m4 | 245 -------------------------------------------------
3 files changed, 4 insertions(+), 251 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index ce93366138..2a5881661b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -82,7 +82,6 @@ m4_define([poppler_required_version], [0.69.0])
m4_define([poppler_data_required_version], [0.4.9])
m4_define([pycairo_required_version], [1.0.2])
m4_define([pygtk_required_version], [2.10.4])
-# m4_define([python2_required_version], [2.5.0])
m4_define([python3_required_version], [3.6.0])
m4_define([rsvg_required_version], [2.40.6])
m4_define([webkitgtk_required_version], [2.20.3])
@@ -181,7 +180,6 @@ PANGOCAIRO_REQUIRED_VERSION=pangocairo_required_version
PERL_REQUIRED_VERSION=perl_required_version
POPPLER_REQUIRED_VERSION=poppler_required_version
POPPLER_DATA_REQUIRED_VERSION=poppler_data_required_version
-# PYTHON2_REQUIRED_VERSION=python2_required_version
PYTHON3_REQUIRED_VERSION=python3_required_version
RSVG_REQUIRED_VERSION=rsvg_required_version
WEBKITGTK_REQUIRED_VERSION=webkitgtk_required_version
@@ -216,7 +214,6 @@ AC_SUBST(PERL_REQUIRED_VERSION)
AC_SUBST(POPPLER_REQUIRED_VERSION)
AC_SUBST(POPPLER_DATA_REQUIRED_VERSION)
AC_SUBST(PYTHON3_REQUIRED_VERSION)
-# AC_SUBST(PYTHON2_REQUIRED_VERSION)
AC_SUBST(RSVG_REQUIRED_VERSION)
AC_SUBST(WEBKITGTK_REQUIRED_VERSION)
AC_SUBST(WEBP_REQUIRED_VERSION)
@@ -2256,7 +2253,8 @@ m4_define([pycheck_error], [
- $1
*** Please install $2, or skip building the python scripting extension by
*** passing --disable-python to configure (but then you will not be able
- *** to use scripts for GIMP that are written in Python)."])
+ *** to use scripts for GIMP that are written in Python)."
+ enable_python="no"])
if test "x$enable_python" != xno; then
enable_python="yes"
@@ -3037,7 +3035,7 @@ Optional Plug-Ins:
Heif >= 1.4.0: $have_libheif_1_4_0
PDF (export): $have_cairo_pdf
Print: $enable_print
- Python 3: $enable_python
+ Python 3: $enable_python
TWAIN (Win32): $os_win32
Webpage: $have_webkit
WMF: $have_libwmf
diff --git a/m4macros/python3dev.m4 b/m4macros/python3dev.m4
index 14e22c39cb..7f2629f548 100644
--- a/m4macros/python3dev.m4
+++ b/m4macros/python3dev.m4
@@ -231,7 +231,7 @@ fi
dnl deduce PYTHON_INCLUDES
py_prefix=`$PYTHON -c "import sys; print(sys.prefix)"`
py_exec_prefix=`$PYTHON -c "import sys; print(sys.exec_prefix)"`
-PYTHON_INCLUDES="-I${py_prefix}/include${py_versiondir}"
+PYTHON_INCLUDES=`$PKG_CONFIG --cflags-only-I python-${PYTHON_VERSION}`
if test "$py_prefix" != "$py_exec_prefix"; then
PYTHON_INCLUDES="$PYTHON_INCLUDES -I${py_exec_prefix}/include${py_versiondir}"
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]