[MacPorts] #62897: subversion-python27bindings at 1.13.0_0: ImportError: No module named _core
MacPorts
noreply at macports.org
Sun May 16 00:40:06 UTC 2021
#62897: subversion-python27bindings at 1.13.0_0: ImportError: No module named _core
---------------------------------+-----------------------------------------
Reporter: khepler | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.4
Keywords: powerpc ppc leopard | Port: subversion-python27bindings
---------------------------------+-----------------------------------------
Subversion bindings for Python 2.7 don't work.
{{{
Python 2.7.18 (default, Oct 12 2020, 15:30:38)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from svn import core
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/local/lib/svn-python2.7/svn/core.py", line 26, in <module>
from libsvn.core import *
File "/opt/local/lib/svn-python2.7/libsvn/core.py", line 17, in <module>
_core = swig_import_helper()
File "/opt/local/lib/svn-python2.7/libsvn/core.py", line 16, in
swig_import_helper
return importlib.import_module('_core')
File
"/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py",
line 37, in import_module
__import__(name)
ImportError: No module named _core
>>>
}}}
Adding the verbose flag to python (log attached) shows a call to
`dlopen("/opt/local/lib/svn-python2.7/libsvn/_core.so", 2);` immediately
before the exception. The dlopen() call and the .py files in the stack
trace show Python can find the module on disk, which seems to be the most
common issue online. The shared object files are installed by subversion-
python27bindings and definitely exist at that location.
{{{
$ ls -lahF /opt/local/lib/svn-python2.7/libsvn/
total 11M
drwxr-xr-x 44 root admin 1.5K May 15 15:03 ./
drwxr-xr-x 4 root admin 136 May 15 15:03 ../
-rw-r--r-- 1 root admin 1.2K May 15 15:02 __init__.py
-rw-r--r-- 1 root admin 131 May 15 15:02 __init__.pyc
-rw-r--r-- 1 root admin 1.1M May 15 15:02 _client.a
-rwxr-xr-x 1 root admin 994 May 15 15:02 _client.la*
-rwxr-xr-x 1 root admin 736K May 15 15:02 _client.so*
-rw-r--r-- 1 root admin 907K May 15 15:02 _core.a
-rwxr-xr-x 1 root admin 982 May 15 15:02 _core.la*
-rwxr-xr-x 1 root admin 681K May 15 15:02 _core.so*
-rw-r--r-- 1 root admin 207K May 15 15:02 _delta.a
-rwxr-xr-x 1 root admin 988 May 15 15:02 _delta.la*
-rwxr-xr-x 1 root admin 199K May 15 15:02 _delta.so*
-rw-r--r-- 1 root admin 220K May 15 15:02 _diff.a
-rwxr-xr-x 1 root admin 982 May 15 15:02 _diff.la*
-rwxr-xr-x 1 root admin 206K May 15 15:02 _diff.so*
-rw-r--r-- 1 root admin 332K May 15 15:02 _fs.a
-rwxr-xr-x 1 root admin 970 May 15 15:02 _fs.la*
-rwxr-xr-x 1 root admin 288K May 15 15:02 _fs.so*
-rw-r--r-- 1 root admin 452K May 15 15:02 _ra.a
-rwxr-xr-x 1 root admin 970 May 15 15:02 _ra.la*
-rwxr-xr-x 1 root admin 351K May 15 15:02 _ra.so*
-rw-r--r-- 1 root admin 608K May 15 15:02 _repos.a
-rwxr-xr-x 1 root admin 988 May 15 15:02 _repos.la*
-rwxr-xr-x 1 root admin 430K May 15 15:02 _repos.so*
-rw-r--r-- 1 root admin 1.1M May 15 15:02 _wc.a
-rwxr-xr-x 1 root admin 970 May 15 15:02 _wc.la*
-rwxr-xr-x 1 root admin 750K May 15 15:02 _wc.so*
-rw-r--r-- 1 root admin 191K May 15 15:02 client.py
-rw-r--r-- 1 root admin 209K May 15 15:02 client.pyc
-rw-r--r-- 1 root admin 308K May 15 15:02 core.py
-rw-r--r-- 1 root admin 335K May 15 15:02 core.pyc
-rw-r--r-- 1 root admin 53K May 15 15:02 delta.py
-rw-r--r-- 1 root admin 59K May 15 15:02 delta.pyc
-rw-r--r-- 1 root admin 55K May 15 15:02 diff.py
-rw-r--r-- 1 root admin 59K May 15 15:02 diff.pyc
-rw-r--r-- 1 root admin 92K May 15 15:02 fs.py
-rw-r--r-- 1 root admin 105K May 15 15:02 fs.pyc
-rw-r--r-- 1 root admin 95K May 15 15:02 ra.py
-rw-r--r-- 1 root admin 107K May 15 15:02 ra.pyc
-rw-r--r-- 1 root admin 109K May 15 15:02 repos.py
-rw-r--r-- 1 root admin 122K May 15 15:02 repos.pyc
-rw-r--r-- 1 root admin 213K May 15 15:02 wc.py
-rw-r--r-- 1 root admin 229K May 15 15:02 wc.pyc
}}}
Python just refuses to load the shared object file.
Preloading the .so with `DYLD_INSERT_LIBRARIES='/opt/local/lib/svn-
python2.7/libsvn/_core.so'` did not help. Swig3 does not work any better
either.
Additionally, I believe the subversion-python27bindings needs to depend on
swig-python since the swig port does not build python2 support by default.
--
Ticket URL: <https://trac.macports.org/ticket/62897>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list