Fix win-tests.py is unable to load Python bindgins with debug configuration.
* win-tests.py
Copy *.pyd files to pylib/libsvn/ file with *_d.pyd suffix and python_d.exe
rather than python.exe when debug configuration.
@@ -1277,7 +1277,11 @@ elif test_swig == 'python':
or isinstance(i, gen_base.TargetSWIGLib)) and i.lang == 'python':
src = os.path.join(abs_objdir, i.filename)
- copy_changed_file(src, to_dir=swig_py_libsvn)
+ basename = os.path.basename(src)
+ if sys.version_info[:2] >= (3, 5) \
+ and basename.endswith('.pyd') and objdir == 'Debug':
+ basename = basename[:-4] + '_d.pyd'
+ copy_changed_file(src, os.path.join(swig_py_libsvn, basename))
py_src = os.path.join(abs_srcdir, 'subversion', 'bindings', 'swig', 'python')
@@ -1299,7 +1303,8 @@ elif test_swig == 'python':
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
