I committed this in revision 938, and closed issue #592. (In the
commit email, the log message doesn't say the issue number, but I've
already fixed that in the repository.)
Thanks, Mo!
-Karl
Mo DeJong <supermo@bayarea.net> writes:
> 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
---------------------------------------------------------------------
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:57 2006