[PATCH 1 of 6] run-tests: remove 2to3 support
Gregory Szorc
gregory.szorc at gmail.com
Sun Feb 28 05:35:52 UTC 2016
# HG changeset patch
# User Gregory Szorc <gregory.szorc at gmail.com>
# Date 1456636117 28800
# Sat Feb 27 21:08:37 2016 -0800
# Node ID b93c9325939d07ccf189a07fbe9097729370b4e1
# Parent 41dcd754526612c43b9695df8851557c851828ef
run-tests: remove 2to3 support
Our goal is to have 1 code base that works on 2.6, 2.7, and 3.5+.
2to3 won't be used. Stop passing it to setup.py.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -2218,42 +2218,40 @@ class TestRunner(object):
installerrs = os.path.join(b"tests", b"install.err")
compiler = ''
if self.options.compiler:
compiler = '--compiler ' + self.options.compiler
if self.options.pure:
pure = b"--pure"
else:
pure = b""
- py3 = ''
# Run installer in hg root
script = os.path.realpath(sys.argv[0])
exe = sys.executable
if PYTHON3:
- py3 = b'--c2to3'
compiler = _bytespath(compiler)
script = _bytespath(script)
exe = _bytespath(exe)
hgroot = os.path.dirname(os.path.dirname(script))
self._hgroot = hgroot
os.chdir(hgroot)
nohome = b'--home=""'
if os.name == 'nt':
# The --home="" trick works only on OS where os.sep == '/'
# because of a distutils convert_path() fast-path. Avoid it at
# least on Windows for now, deal with .pydistutils.cfg bugs
# when they happen.
nohome = b''
- cmd = (b'%(exe)s setup.py %(py3)s %(pure)s clean --all'
+ cmd = (b'%(exe)s setup.py %(pure)s clean --all'
b' build %(compiler)s --build-base="%(base)s"'
b' install --force --prefix="%(prefix)s"'
b' --install-lib="%(libdir)s"'
b' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1'
- % {b'exe': exe, b'py3': py3, b'pure': pure,
+ % {b'exe': exe, b'pure': pure,
b'compiler': compiler,
b'base': os.path.join(self._hgtmp, b"build"),
b'prefix': self._installdir, b'libdir': self._pythondir,
b'bindir': self._bindir,
b'nohome': nohome, b'logfile': installerrs})
# setuptools requires install directories to exist.
def makedirs(p):
More information about the Mercurial-devel
mailing list