Hi there,
I observed a problem with this commit while looking at the 1.2.23
candidate. Please see below.
Am 12.10.2018 um 18:02 schrieb csuth...@apache.org:
Author: csutherl
Date: Fri Oct 12 16:02:57 2018
New Revision: 1843685
URL: http://svn.apache.org/viewvc?rev=1843685&view=rev
Log:
Update buildconf and buildcheck.sh to detect and run under Python 3 or 2. Same
logic as apr-1.7.x uses, see commit apr r1834494.
Modified:
tomcat/native/trunk/native/build/buildcheck.sh
tomcat/native/trunk/native/buildconf
Modified: tomcat/native/trunk/native/build/buildcheck.sh
URL:
http://svn.apache.org/viewvc/tomcat/native/trunk/native/build/buildcheck.sh?rev=1843685&r1=1843684&r2=1843685&view=diff
==============================================================================
--- tomcat/native/trunk/native/build/buildcheck.sh (original)
+++ tomcat/native/trunk/native/build/buildcheck.sh Fri Oct 12 16:02:57 2018
@@ -19,14 +19,14 @@
echo "buildconf: checking installation..."
# any python
-python=`build/PrintPath python`
+python=${PYTHON-`build/PrintPath python3 python2 python`}
if test -z "$python"; then
echo "buildconf: python not found."
echo " You need python installed"
echo " to build Tomcat Native from SVN."
exit 1
else
-py_version=`python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
+py_version=`$python -c 'import sys; print sys.version' 2>&1|sed 's/ .*//;q'`
echo "buildconf: python version $py_version (ok)"
fi
Modified: tomcat/native/trunk/native/buildconf
URL:
http://svn.apache.org/viewvc/tomcat/native/trunk/native/buildconf?rev=1843685&r1=1843684&r2=1843685&view=diff
==============================================================================
--- tomcat/native/trunk/native/buildconf (original)
+++ tomcat/native/trunk/native/buildconf Fri Oct 12 16:02:57 2018
@@ -79,8 +79,10 @@ fi
#
# Generate build-outputs.mk for the build systme
#
+PYTHON=${PYTHON-`build/PrintPath python3 python2 python`}
+
echo "Generating 'make' outputs ..."
-$apr_src_dir/build/gen-build.py make
+${PYTHON} $apr_src_dir/build/gen-build.py make
if [ $? -gt 0 ]; then
echo "Creating build-outputs.mk failed"
exit 1
The gen-build.py script of the latest APR release 1.6.5 (and older ones
probably as well) does not run with python3, at least not for me:
Traceback (most recent call last):
File "path/to/build/gen-build.py", line 13, in <module>
import ConfigParser
ImportError: No module named 'ConfigParser'
The compatibility of APR's gen-build.py with python3 in APR 1.7.x has
been backported to 1.6.x in November 2018, but there was no 1.6.x
release since then. So it seems currently our release script fails
whenever python3 is found.
I:m not sure, whether we should ignore that, or postpone the above
python3 support until APR 1.6.x got a new release (or 1.7.x got a first
release).
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org