[gom] python: Fix distcheck
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gom] python: Fix distcheck
- Date: Sat, 26 Dec 2015 18:02:11 +0000 (UTC)
commit bd947a06e2346cf561aae9874b27ee15e585f4fa
Author: Bastien Nocera <hadess hadess net>
Date: Sat Dec 26 18:25:21 2015 +0100
python: Fix distcheck
Installation failed during distcheck as it tried to install in the
system Python directories, which normal users can't install to.
Makefile.am | 6 +++++-
configure.ac | 16 ++++++++++++++--
2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index e793b0b..8ce24d3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,7 +8,11 @@ include tests/Makefile.include
SUBDIRS = . doc po
ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
-DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc --enable-introspection --enable-silent-rules
+DISTCHECK_CONFIGURE_FLAGS = \
+ --enable-gtk-doc \
+ --enable-introspection \
+ --enable-silent-rules \
+ --with-pythondir='$${libdir}/python-gom-distcheck/site-packages/gi/overrides'
EXTRA_DIST += README COPYING NEWS
diff --git a/configure.ac b/configure.ac
index 5a3f84c..6373a8a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -163,14 +163,26 @@ else
else
PKG_CHECK_MODULES(pygobject, [pygobject-3.0 >= 3.16.0], [
found_python="yes"
- pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
- AC_SUBST(pyoverridesdir)
], [
found_python="no"
])
fi
fi
+AC_ARG_WITH(pythondir,
+ AS_HELP_STRING([--with-pythondir=DIR],[Installation path for Python bindings @<:@auto@:>@]),
+ [ac_with_pythondir=$withval],
+ [ac_with_pythondir=""])
+
+if test "x$found_python" = "xyes"; then
+ if test "x$ac_with_pythondir" = "x"; then
+ pyoverridesdir=`$PYTHON -c "import gi; print(gi._overridesdir)"`
+ AC_SUBST(pyoverridesdir)
+ else
+ pyoverridesdir="$ac_with_pythondir"
+ fi
+fi
+
if test "x$enable_python" = "xyes" -a "x$found_python" != "xyes"; then
AC_MSG_ERROR([You need to have Python 3 and PyGObject installed])
fi
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]