Author: svn-role Date: Mon Dec 21 04:00:12 2020 New Revision: 1884665 URL: http://svn.apache.org/viewvc?rev=1884665&view=rev Log: Merge r1884642 from trunk:
* r1884642 Fix win-tests.py is unable to load Python bindings with debug configuration since Python 3.5. Justification: Allow unit tests with debug configuration on Windows. Votes: +1: jun66j5, jcorvel Modified: subversion/branches/1.14.x/ (props changed) subversion/branches/1.14.x/STATUS subversion/branches/1.14.x/win-tests.py Propchange: subversion/branches/1.14.x/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1884642 Modified: subversion/branches/1.14.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/STATUS?rev=1884665&r1=1884664&r2=1884665&view=diff ============================================================================== --- subversion/branches/1.14.x/STATUS (original) +++ subversion/branches/1.14.x/STATUS Mon Dec 21 04:00:12 2020 @@ -60,11 +60,3 @@ Veto-blocked changes: Approved changes: ================= - - * r1884642 - Fix win-tests.py is unable to load Python bindings with debug configuration - since Python 3.5. - Justification: - Allow unit tests with debug configuration on Windows. - Votes: - +1: jun66j5, jcorvel Modified: subversion/branches/1.14.x/win-tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.14.x/win-tests.py?rev=1884665&r1=1884664&r2=1884665&view=diff ============================================================================== --- subversion/branches/1.14.x/win-tests.py (original) +++ subversion/branches/1.14.x/win-tests.py Mon Dec 21 04:00:12 2020 @@ -1263,7 +1263,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') @@ -1285,7 +1289,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