[Libvir] [PATCH] Always build in python/ subdir.

Jim Meyering jim at meyering.net
Mon Dec 10 17:16:33 UTC 2007


Hi guys,

I'd like to remove the PYTHON_SUBDIR parameter, but (of course)
still allow configure/build to proceed even when python-devel is
not installed.

Why?
Because with the current code, I was able to build and _try_ to test
a broken distribution tarball.

Here's how it happened:

    While I had temporarily removed python-devel, I configured/built
    libvirt, ran "make check" to ensure that everything was ok, created a
    tarball to test on a remote RHEL5 system, and copied it over.  But on
    the RHEL5 system, configure failed due to lack of python/Makefile.in.
    The entire python/ directory was missing.

With the following change, I've confirmed it works as well as before
(on both rawhide and RHEL5), yet can't cause the trouble I described:

	Always build in python/ subdir.
	* configure.in (PYTHON_SUBDIR): Don't set.  Remove all uses.
	* Makefile.am (SUBDIRS): Hard-code "python" here.
	(tests): Test equivalent "$(pythondir)", not @PYTHON_SUBDIR at .

---
 Makefile.am  |    4 ++--
 configure.in |    7 -------
 2 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index c49c533..34a1eb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@
 ## Process this file with automake to produce Makefile.in
 
 SUBDIRS = gnulib/lib include src qemud proxy docs gnulib/tests \
-  @PYTHON_SUBDIR@ tests po scripts
+  python tests po scripts
 
 ACLOCAL_AMFLAGS = -I m4 -I gnulib/m4
 
@@ -21,7 +21,7 @@ check-local: all tests
 
 tests:
 	@(cd docs/examples ; $(MAKE) MAKEFLAGS+=--silent tests)
-	@(if [ "@PYTHON_SUBDIR@" != "" ] ; then cd python ; \
+	@(if [ "$(pythondir)" != "" ] ; then cd python ; \
 	  $(MAKE) MAKEFLAGS+=--silent tests ; fi)
 
 cov: cov-recursive cov-am
diff --git a/configure.in b/configure.in
index 8e5cca4..d37c0d8 100644
--- a/configure.in
+++ b/configure.in
@@ -568,14 +568,7 @@ else
     PYTHON=
 fi
 AM_CONDITIONAL(WITH_PYTHON, test "$PYTHON_INCLUDES" != "")
-if test "$PYTHON_INCLUDES" != ""
-then
-    PYTHON_SUBDIR=python
-else
-    PYTHON_SUBDIR=
-fi
 AC_SUBST(pythondir)
-AC_SUBST(PYTHON_SUBDIR)
 AC_SUBST(PYTHON_VERSION)
 AC_SUBST(PYTHON_INCLUDES)
 AC_SUBST(PYTHON_SITE_PACKAGES)
-- 
1.5.3.7.1112.g9758e




More information about the libvir-list mailing list