Bug 237620 - devel/py-subversion broken for Python 3
Summary: devel/py-subversion broken for Python 3
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Lev A. Serebryakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-28 05:10 UTC by Yasuhito FUTATSUKI
Modified: 2019-04-30 11:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (lev)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yasuhito FUTATSUKI 2019-04-28 05:10:55 UTC
Subversion swig Python bindings don't support Python 3 yet.

If the patch below is applied to devel/py-subversion/Makefile,
port build runs sanity test for swig python bindings, and will fail
except if FLAVOR=py27.


Index: devel/py-subversion/Makefile
===================================================================
--- devel/py-subversion/Makefile        (revision 500076)
+++ devel/py-subversion/Makefile        (working copy)
@@ -24,7 +24,7 @@
                        --without-kwallet \
                        --with-apxs=no
 
-ALL_TARGET=    swig-py-lib swig-py
+ALL_TARGET=    swig-py-lib swig-py check-swig-py
 INSTALL_TARGET=        install-swig-py
 
 .include <bsd.port.post.mk>
Comment 1 Lev A. Serebryakov freebsd_committer 2019-04-29 15:07:51 UTC
It works for me, I've checked this:

Listing '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/__init__.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/client.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/core.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/delta.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/diff.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/fs.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/ra.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/repos.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/libsvn/wc.py'...
Listing '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/__init__.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/client.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/core.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/delta.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/diff.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/fs.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/ra.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/repos.py'...
Compiling '/usr/ports/devel/py-subversion/work-py37/stage/usr/local/lib/python3.7/site-packages/svn/wc.py'...
====> Compressing man pages (compress-man)
%
Comment 2 Yasuhito FUTATSUKI 2019-04-29 16:00:54 UTC
(In reply to Lev A. Serebryakov from comment #1)
The modules built are broken.

Please test with above patch, or manually run 'make check-swig-py' in build root directory in work-pyXX. 

... or try to import installed modules from Python after install,

with py27-subversion:
% python2.7 -c 'import svn.core'

with py35-subversion:
% python3.6 -c 'import svn.core'

with py36-subversion:
% python3.6 -c 'import svn.core'

with py37-subversion:
% python3.7 -c 'import svn.core'

except py27 case these causes exception.
Comment 3 Lev A. Serebryakov freebsd_committer 2019-04-29 16:10:14 UTC
Oh, I need to be more careful. I read your patch other way around.
Sorry.
Comment 4 commit-hook freebsd_committer 2019-04-30 11:07:08 UTC
A commit references this bug:

Author: lev
Date: Tue Apr 30 11:06:50 UTC 2019
New revision: 500477
URL: https://svnweb.freebsd.org/changeset/ports/500477

Log:
    Require python 2.7 and add tests to build process.

    Requirement for python 2.7 will be removed when subversion make
  support for python3.

  PR:		237620
  Submitted by:	Yasuhito FUTATSUKI <freebsd-bug-report-yf@yf.bsdclub.org>

Changes:
  head/devel/py-subversion/Makefile
Comment 5 Lev A. Serebryakov freebsd_committer 2019-04-30 11:07:49 UTC
Fixed, thnx!