On 2019/10/18 8:39, Branko Čibej wrote:
On 17.10.2019 23:46, Branko Čibej wrote:
On 17.10.2019 23:01, Daniel Shahaf wrote:
Branko Čibej wrote on Thu, Oct 17, 2019 at 22:56:29 +0200:
On 17.10.2019 22:37, Daniel Shahaf wrote:
Branko Čibej wrote on Thu, 17 Oct 2019 06:49 +00:00:
On 16.10.2019 10:01, Daniel Shahaf wrote:
Which reminds me: it'd be nice to set up a buildbot to run the build and
test process under Python 3. Any committer can edit the buildbot
scripts[1], but the question is which of the buildbot slaves has Python 3
installed?
https://ci.apache.org/builders/svn-x64-macosx-local-python3
Been there, done that, bought the DVD.
Why are svnadmin_tests 69 and tree_conflict_tests 26 passing on that
bot? They (currently) fail under python3.
I don't know. It's possible, I suppose, that the activation of the
python3 virtual environment has no effect on the test driver. It might
not be a bad idea to have the tests print the Python version in the
summary and possibly in the log of every test case.
What's the value of $(PYTHON) in Makefile? That's what the «check» target uses.
Yep, apparently that's the bug ... I'm testing script changes now, along
with r1868566 for good measure.
I've set up this:
https://ci.apache.org/builders/svn-x64-macosx-local-python3-swig
It will build and test the core libraries and swig-py bindings with
Python 3 on the swig-py3 branch.
I hope ... build #0 running as we speak.
Unfortunately build #2, which ran after upgrading SWIG and Python, failed
to build SWIG Python bindings because of SWIG 4.0, as reported on SVN-4818.
This also affects on trunk with SWIG 4.0.
(e.g. https://ci.apache.org/builders/svn-x64-macosx-full/builds/2418)
With attached patch on trunk (trunk_build_with_swig4_patch.txt) and
on swig-py3 (swig_py3_build_with_swig4_patch.txt), *.so can be produced,
but the modules don't work correctly.
It seems they were caused by incompatibility of Python code for proxy
object generated by SWIG, and it can not be resolved so simple....
(importlib module vs simply use 'import', absense of _swig_setattr()
and _swig_getattr(), etc.)
Cheers,
--
Yasuhito FUTATSUKI <futat...@poem.co.jp>
Index: Makefile.in
===================================================================
--- Makefile.in (revision 1868599)
+++ Makefile.in (working copy)
@@ -200,6 +200,7 @@
SWIG_PY_FEATURES = @SWIG_PY_FEATURES@
SWIG_PL_FEATURES = @SWIG_PL_FEATURES@
SWIG_RB_FEATURES = @SWIG_RB_FEATURES@
+SWIG_PY_OPTS = @SWIG_PY_OPTS@
COMPILE = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CMAINTAINERFLAGS) $(CFLAGS)
$(INCLUDES)
COMPILE_NOWARN = $(CC) $(CMODEFLAGS) $(CPPFLAGS) $(CNOWARNFLAGS) $(CFLAGS)
$(INCLUDES)
Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4 (revision 1868599)
+++ build/ac-macros/swig.m4 (working copy)
@@ -128,6 +128,12 @@
ac_cv_python_libs="`$PYTHON ${abs_srcdir}/build/get-py-info.py --libs`"
])
SWIG_PY_LIBS="`SVN_REMOVE_STANDARD_LIB_DIRS($ac_cv_python_libs)`"
+
+ if test "$SWIG_VERSION" -ge "400000"; then
+ SWIG_PY_OPTS="-python -nofastunpack"
+ else
+ SWIG_PY_OPTS="-python -classic"
+ fi
fi
if test "$PERL" != "none"; then
@@ -270,6 +276,7 @@
AC_SUBST(SWIG_PY_COMPILE)
AC_SUBST(SWIG_PY_LINK)
AC_SUBST(SWIG_PY_LIBS)
+ AC_SUBST(SWIG_PY_OPTS)
AC_SUBST(SWIG_PL_INCLUDES)
AC_SUBST(SWIG_PL_LINK)
AC_SUBST(SWIG_RB_LINK)
Index: build.conf
===================================================================
--- build.conf (revision 1868599)
+++ build.conf (working copy)
@@ -101,7 +101,7 @@
bdb-test-scripts =
-swig-python-opts = $(SWIG_FEATURES) -python $(SWIG_PY_FEATURES) -classic
+swig-python-opts = $(SWIG_FEATURES) $(SWIG_PY_OPTS) $(SWIG_PY_FEATURES)
swig-perl-opts = $(SWIG_FEATURES) -perl $(SWIG_PL_FEATURES) -nopm -noproxy
swig-ruby-opts = $(SWIG_FEATURES) -ruby $(SWIG_RB_FEATURES)
swig-languages = python perl ruby
Index: build/ac-macros/swig.m4
===================================================================
--- build/ac-macros/swig.m4 (revision 1868603)
+++ build/ac-macros/swig.m4 (working copy)
@@ -157,10 +157,18 @@
ac_cv_python_is_py3="yes"
])
- if test "$ac_cv_python_is_py3" = "yes"; then
- SWIG_PY_OPTS="-python -py3"
+ if test "$SWIG_VERSION" -ge "400000"; then
+ if test "$ac_cv_python_is_py3" = "yes"; then
+ SWIG_PY_OPTS="-python -py3 -nofastunpack"
+ else
+ SWIG_PY_OPTS="-python -nofastunpack"
+ fi
else
- SWIG_PY_OPTS="-python -classic"
+ if test "$ac_cv_python_is_py3" = "yes"; then
+ SWIG_PY_OPTS="-python -py3"
+ else
+ SWIG_PY_OPTS="-python -classic"
+ fi
fi
dnl SWIG Python bindings successfully configured, clear the error
message