Mercurial > hg
comparison tests/run-tests.py @ 48864:a2f0af520ae5
tests: delete some not PYTHON3 blocks
These can never be used anymore.
Differential Revision: https://phab.mercurial-scm.org/D12242
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 20 Feb 2022 13:26:15 -0700 |
parents | c76255cde807 |
children | 7caa967bb7b6 |
comparison
equal
deleted
inserted
replaced
48863:c76255cde807 | 48864:a2f0af520ae5 |
---|---|
3608 with open(stub_exec_path, 'wb') as f: | 3608 with open(stub_exec_path, 'wb') as f: |
3609 f.write(b'#!/bin/sh\n') | 3609 f.write(b'#!/bin/sh\n') |
3610 f.write(b'%s "$@"\n' % esc_executable) | 3610 f.write(b'%s "$@"\n' % esc_executable) |
3611 | 3611 |
3612 if WINDOWS: | 3612 if WINDOWS: |
3613 if not PYTHON3: | |
3614 # lets try to build a valid python3 executable for the | |
3615 # scrip that requires it. | |
3616 py3exe_name = os.path.join(self._custom_bin_dir, b'python3') | |
3617 with open(py3exe_name, 'wb') as f: | |
3618 f.write(b'#!/bin/sh\n') | |
3619 f.write(b'py -3 "$@"\n') | |
3620 | |
3621 # adjust the path to make sur the main python finds it own dll | 3613 # adjust the path to make sur the main python finds it own dll |
3622 path = os.environ['PATH'].split(os.pathsep) | 3614 path = os.environ['PATH'].split(os.pathsep) |
3623 main_exec_dir = os.path.dirname(sysexecutable) | 3615 main_exec_dir = os.path.dirname(sysexecutable) |
3624 extra_paths = [_bytes2sys(self._custom_bin_dir), main_exec_dir] | 3616 extra_paths = [_bytes2sys(self._custom_bin_dir), main_exec_dir] |
3625 | 3617 |
3628 appdata = os.environ.get('APPDATA') | 3620 appdata = os.environ.get('APPDATA') |
3629 vi = sys.version_info | 3621 vi = sys.version_info |
3630 if appdata is not None: | 3622 if appdata is not None: |
3631 python_dir = 'Python%d%d' % (vi[0], vi[1]) | 3623 python_dir = 'Python%d%d' % (vi[0], vi[1]) |
3632 scripts_path = [appdata, 'Python', python_dir, 'Scripts'] | 3624 scripts_path = [appdata, 'Python', python_dir, 'Scripts'] |
3633 if not PYTHON3: | |
3634 scripts_path = [appdata, 'Python', 'Scripts'] | |
3635 scripts_dir = os.path.join(*scripts_path) | 3625 scripts_dir = os.path.join(*scripts_path) |
3636 extra_paths.append(scripts_dir) | 3626 extra_paths.append(scripts_dir) |
3637 | 3627 |
3638 os.environ['PATH'] = os.pathsep.join(extra_paths + path) | 3628 os.environ['PATH'] = os.pathsep.join(extra_paths + path) |
3639 | 3629 |