On 2020/06/02 6:01, Karl Berry wrote:
> With svn-1.14.0, if "python" is Python 2 (it's still 2.6.6 on CentOS7),
> and --with-swig is given, make swig-py succeeds, but check-swig-py fails
> cd /usr/local/src/subversion-1.14.0/subversion/bindings/swig/python; \
> /usr/local/bin/python /usr/local/src/subversion-1.14.0/subversion/bindings/swig/python/tests/run_all.py
> Traceback (most recent call last):
> File "/usr/local/src/subversion-1.14.0/subversion/bindings/swig/python/tests/run_all.py", line 23, in <module>
> import mergeinfo, core, client, delta, checksum, pool, fs, ra, wc, repository, \
> File "/home/local/src/subversion-1.14.0/subversion/bindings/swig/python/tests/mergeinfo.py", line 22, in <module>
> from svn import core, repos, fs
> File "/home/local/src/subversion-1.14.0/subversion/bindings/swig/python/svn/core.py", line 26, in <module>
> from libsvn.core import *
> File "/home/local/src/subversion-1.14.0/subversion/bindings/swig/python/libsvn/core.py", line 152
> def apr_initialize() -> "apr_status_t":
> SyntaxError: invalid syntax
> make: *** [Makefile:944: check-swig-py] Error 1
I know it is already answered, but I'd like to point out another issue,
and thanks Karl for this report.
If you really used Python 2.6 (not Python 2.7) and the confugure script
fails to find Python interpreter 2.7 or above by using build/find_python.sh,
'make swig-py' should stop with the message
SWIG python disabled at configure time: check config.log for details
before compiling something, because we intended to prevent building
Python bindings with Python 2.6 and older.
(There exist a known issue that our build system cannot detect whether
we should re-generate SWIG Python bindings intermediate source files,
and this is the case regeneration is needed, as it is already answered.)
> It would be nice if the configure script bailed out in this
> configuration instead of leaving it for a painful Python message after
> building everything. Assuming it's intentional that Python 2 isn't
> supported any more.
> Also, py3c is apparently necessary. Again it would be nice if configure
> bailed out if it's not present.
In this case it should also stop with the message:
SWIG python disabled at configure time: py3c library not found
However, the 1.14.0 release tarball contains .swig_py_checked (not to be
intended, I beleive), which is created if 'make swig-py' is allowed
by the result of configure (by "._swig_py_checked" target in Makefile),
so it didn't stop as we expected.
The 1.14.0 release tarball contains also '.swig_pl_checked' and
'.swig_rb_checked' files. Should they omit from release tarball?
Also, should the configure script remove them?
Yasuhito FUTATSUKI <futatuki_at_yf.bsclub.org>
Received on 2020-06-02 07:55:49 CEST