[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: make check produces error

From: Mo DeJong <supermo_at_bayarea.net>
Date: 2001-12-20 17:23:52 CET

On 20 Dec 2001 09:41:11 -0600
cmpilato@collab.net wrote:

> So, after applying this patch to my working copy, running
> autogen.sh/configure/make check, I have to ask the following question:
>
> Mo, did you even *try* your own patch before submitting it?

Sorry about that. I will be more careful with future patches.
Here is a revised (and tested) patch that will fix the problem.

2001-12-20 Mo DeJong <supermo@bayarea.net>

        * Makefile.in: Check python version before running
        test cases.
        * autogen.sh: Check to see if python is installed
        before generating build files.
        * configure.in: Check installed python version.
        * pycheck.py: New script that will check the
        installed version of python and print a warning
        unless python 2.X or newer is found.

Index: ./Makefile.in
===================================================================
--- ./.svn/text-base/Makefile.in.svn-base Wed Dec 5 06:57:05 2001
+++ ./Makefile.in Thu Dec 20 05:41:43 2001
@@ -117,6 +117,7 @@
         @logfile=`pwd`/tests.log ; \
         echo > $$logfile ; \
         failed=no ; \
+ $(PYTHON) $(top_srcdir)/pycheck.py ; \
         list='$(TEST_PROGRAMS) @FS_TEST_PROGRAMS@'; for prog in $$list; do \
             chmod a+x $$prog ; \
             progbase=`echo $$prog | sed 's?.*/??'` ; \
Index: ./autogen.sh
===================================================================
--- ./.svn/text-base/autogen.sh.svn-base Wed Dec 5 06:57:05 2001
+++ ./autogen.sh Thu Dec 20 05:49:45 2001
@@ -72,7 +72,15 @@
 # Create the file detailing all of the build outputs for SVN.
 #
 # Note: this dependency on Python is fine: only SVN developers use autogen.sh
-# and we can state that dev people need Python on their machine
+# and we can state that dev people need Python on their machine. Note
+# that running gen-make.py requires Python 1.X or newer.
+
+OK=`python -c 'print "OK"'`
+if test "${OK}" != "OK" ; then
+ echo "Python check failed, make sure python is installed and on the PATH"
+ exit 1
+fi
+
 if test "$1" = "-s"; then
   echo "Creating build-outputs.mk (no dependencies)..."
   ./gen-make.py -s build.conf ;
@@ -82,7 +90,7 @@
 fi
 
 if test "$?" != "0"; then
- echo "gen-make.py failed, is python really installed?"
+ echo "gen-make.py failed"
   exit 1
 fi
 
Index: ./configure.in
===================================================================
--- ./.svn/text-base/configure.in.svn-base Wed Dec 5 06:57:03 2001
+++ ./configure.in Thu Dec 20 05:41:43 2001
@@ -258,13 +258,17 @@
 AC_DEFINE_UNQUOTED(SVN_PATH_STRIP_TRAILING_SLASHDOT, 0,
         [Non-zero if the trailing /. in paths should be stripped])
 
-dnl Find a python binary, refer
+dnl Find a python 2.X binary, test cases will not run with Python 1.X
 
 AC_PATH_PROG(PYTHON2, python2, none)
 if test "$PYTHON2" = "none"; then
- AC_PATH_PROG(PYTHON, python, fail-without-python)
+ AC_PATH_PROG(PYTHON, python, none)
 else
         PYTHON=$PYTHON2
+fi
+if test "$PYTHON" != "none"; then
+ echo "checking for Python 2.0 or newer"
+ ${PYTHON} ${abs_srcdir}/pycheck.py
 fi
 
 AC_PATH_PROG(MAKEINFO, makeinfo, [echo cannot run makeinfo])
Index: ./pycheck.py
===================================================================
--- /dev/null Tue May 5 13:32:27 1998
+++ pycheck.py Thu Dec 13 06:46:49 2001
@@ -0,0 +1,5 @@
+import sys
+if sys.hexversion < 0x2000000:
+ print "pycheck: WARNING, Python 2.X or newer is required to run tests."
+ sys.exit(1)
+sys.exit(0)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:53 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.