On 2020/05/12 19:17, Johan Corveleyn wrote:
>> On Tue, May 12, 2020 at 4:33 AM Johan Corveleyn <jcorvel_at_gmail.com> wrote:
>>> [[[
>>> C:\research\svn\dev\trunk>python win-tests.py --log-level=DEBUG
>>> --debug --swig=python R:\test_swigpython
>>> Testing Debug configuration on local repository.
>>> -- Running Swig Python tests --
>>> Fatal Python error: _PyInterpreterState_Get(): no current thread state
>>> Python runtime state: unknown
>>>
>>> [Test runner reported failure]
>>> ]]]
At least, I think we should use python_d.exe when debug configuration.
[[[
Index: win-tests.py
===================================================================
--- win-tests.py (revision 1877480)
+++ win-tests.py (working copy)
@@ -1285,7 +1285,8 @@
if 'PYTHONPATH' in os.environ:
pythonpath += os.pathsep + os.environ['PYTHONPATH']
- python_exe = 'python.exe'
+ python_exe = sys.executable if objdir != 'Debug' else \
+ os.path.join(os.path.dirname(sys.executable), 'python_d.exe')
old_cwd = os.getcwd()
try:
os.environ['PYTHONPATH'] = pythonpath
]]]
However, importing libsvn._core fails on debug configuration even with/without
py38-windows-add-dll-directory--v2.diff (tested on Python 3.7.7).
Python bindings with debug configuration for Python 3.x has something wrong.
[[[
-- Running Swig Python tests --
Traceback (most recent call last):
File "C:\usr\src\subversion\trunk-py3\Debug\swig\pylib\libsvn\core.py", line 14, in swig_import_helper
return importlib.import_module(mname)
File "C:\usr\apps\python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'libsvn._core'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\usr\src\subversion\trunk-py3\subversion\bindings\swig\python\tests\run_all.py", line 23, in <module>
import mergeinfo, core, client, delta, checksum, pool, fs, ra, wc, repository, \
File "C:\usr\src\subversion\trunk-py3\subversion\bindings\swig\python\tests\mergeinfo.py", line 22, in <module>
from svn import core, repos, fs
File "C:\usr\src\subversion\trunk-py3\subversion\bindings\swig\python\tests/..\svn\core.py", line 26, in <module>
from libsvn.core import *
File "C:\usr\src\subversion\trunk-py3\Debug\swig\pylib\libsvn\core.py", line 17, in <module>
_core = swig_import_helper()
File "C:\usr\src\subversion\trunk-py3\Debug\swig\pylib\libsvn\core.py", line 16, in swig_import_helper
return importlib.import_module('_core')
File "C:\usr\apps\python37\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
ModuleNotFoundError: No module named '_core'
[Test runner reported failure]
]]]
--
Jun Omae <jun66j5_at_gmail.com> (大前 潤)
Received on 2020-05-13 10:56:43 CEST