comparison tests/run-tests.py @ 28397:98a1a9547bb1

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sat, 27 Feb 2016 21:08:37 -0800
parents 8de70574be2c
children 412ee35a8005
comparison
equal deleted inserted replaced
28396:5490b04e6132 28397:98a1a9547bb1
2221 compiler = '--compiler ' + self.options.compiler 2221 compiler = '--compiler ' + self.options.compiler
2222 if self.options.pure: 2222 if self.options.pure:
2223 pure = b"--pure" 2223 pure = b"--pure"
2224 else: 2224 else:
2225 pure = b"" 2225 pure = b""
2226 py3 = ''
2227 2226
2228 # Run installer in hg root 2227 # Run installer in hg root
2229 script = os.path.realpath(sys.argv[0]) 2228 script = os.path.realpath(sys.argv[0])
2230 exe = sys.executable 2229 exe = sys.executable
2231 if PYTHON3: 2230 if PYTHON3:
2232 py3 = b'--c2to3'
2233 compiler = _bytespath(compiler) 2231 compiler = _bytespath(compiler)
2234 script = _bytespath(script) 2232 script = _bytespath(script)
2235 exe = _bytespath(exe) 2233 exe = _bytespath(exe)
2236 hgroot = os.path.dirname(os.path.dirname(script)) 2234 hgroot = os.path.dirname(os.path.dirname(script))
2237 self._hgroot = hgroot 2235 self._hgroot = hgroot
2241 # The --home="" trick works only on OS where os.sep == '/' 2239 # The --home="" trick works only on OS where os.sep == '/'
2242 # because of a distutils convert_path() fast-path. Avoid it at 2240 # because of a distutils convert_path() fast-path. Avoid it at
2243 # least on Windows for now, deal with .pydistutils.cfg bugs 2241 # least on Windows for now, deal with .pydistutils.cfg bugs
2244 # when they happen. 2242 # when they happen.
2245 nohome = b'' 2243 nohome = b''
2246 cmd = (b'%(exe)s setup.py %(py3)s %(pure)s clean --all' 2244 cmd = (b'%(exe)s setup.py %(pure)s clean --all'
2247 b' build %(compiler)s --build-base="%(base)s"' 2245 b' build %(compiler)s --build-base="%(base)s"'
2248 b' install --force --prefix="%(prefix)s"' 2246 b' install --force --prefix="%(prefix)s"'
2249 b' --install-lib="%(libdir)s"' 2247 b' --install-lib="%(libdir)s"'
2250 b' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1' 2248 b' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1'
2251 % {b'exe': exe, b'py3': py3, b'pure': pure, 2249 % {b'exe': exe, b'pure': pure,
2252 b'compiler': compiler, 2250 b'compiler': compiler,
2253 b'base': os.path.join(self._hgtmp, b"build"), 2251 b'base': os.path.join(self._hgtmp, b"build"),
2254 b'prefix': self._installdir, b'libdir': self._pythondir, 2252 b'prefix': self._installdir, b'libdir': self._pythondir,
2255 b'bindir': self._bindir, 2253 b'bindir': self._bindir,
2256 b'nohome': nohome, b'logfile': installerrs}) 2254 b'nohome': nohome, b'logfile': installerrs})