On 2020/05/27 22:38, Stuart Henderson wrote:
> On 2020/05/27 19:23, Stefan Sperling wrote:
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/client.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/client.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/core.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/core.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/delta.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/delta.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/diff.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/diff.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/fs.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/fs.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/ra.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/ra.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/repos.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/repos.pyc
> >  lib/python${MODPY_VERSION}/site-packages/libsvn/wc.py
> > -lib/python${MODPY_VERSION}/site-packages/libsvn/wc.pyc
> >  lib/python${MODPY_VERSION}/site-packages/svn/
> >  lib/python${MODPY_VERSION}/site-packages/svn/__init__.py
> >  lib/python${MODPY_VERSION}/site-packages/svn/__init__.pyc
> 
> I am looking at this, the missing .pyc files are a red flag - in build log
> you'll see some "SyntaxError: invalid syntax" which I think suggests it may
> be using swig in py3 mode.

...not sure what in the build is causing the problem, but the bindings are
definitely not working, this should return silently:

$ python2
Python 2.7.18 (default, Apr 24 2020, 15:52:16) 
[GCC 4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final)] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn.fs
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/svn/fs.py", line 26, in <module>
    from libsvn.fs import *
  File "/usr/local/lib/python2.7/site-packages/libsvn/fs.py", line 152
    def svn_fs_version() -> "svn_version_t const *":
                         ^
SyntaxError: invalid syntax
>>> 


Old version looks like this:

$ python2
Python 2.7.18 (default, Apr 24 2020, 15:52:16) 
[GCC 4.2.1 Compatible OpenBSD Clang 8.0.1 (tags/RELEASE_801/final)] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import svn.fs
>>> 

autoconf does seem to be setting up to use the right parameters for swig
but I'm not all that familiar with swig/python so I may have missed
something. Whatever ends up being needed to fix generation of the pyc
files should fix runtime too.

This is probably most easily fixed by someone who knows their way around
svn's swig build infrastructure..

> Also I think I know how to add a python3 flavour so that it can be built
> again with py3 bindings.

I have a diff for that but it should go on top of an existing commit
rather than be stacked up so I'll keep it local for now. I would like
this though because it will allow moving Trac without having to deal
with cvs2svn as well. (The py2 and py3 bindings will need to conflict
due to the libsvn_swig_py-1* libraries - I don't think that's really a
problem, the trac upgrade path will be a little messy but people will
cope, it just needs a current.html entry to tell them to pkg_delete and
reinstall).

Reply via email to