# HG changeset patch # User Christian Ebert # Date 1379988779 -3600 # Node ID 5a04f94e1da9d94bb22bdb39f31337b46554b4df # Parent 451cbdc0b353c0727ea83b459ac1a9951aafce98# Parent 6e9bfd51bc6feb310d79665e350e017366cac2f1 Merge with stable diff -r 451cbdc0b353 -r 5a04f94e1da9 tests/run-tests.py --- a/tests/run-tests.py Mon Aug 05 13:19:38 2013 +0100 +++ b/tests/run-tests.py Tue Sep 24 03:12:59 2013 +0100 @@ -460,6 +460,9 @@ if options.compiler: compiler = '--compiler ' + options.compiler pure = options.pure and "--pure" or "" + py3 = '' + if sys.version_info[0] == 3: + py3 = '--c2to3' # Run installer in hg root script = os.path.realpath(sys.argv[0]) @@ -472,11 +475,11 @@ # least on Windows for now, deal with .pydistutils.cfg bugs # when they happen. nohome = '' - cmd = ('%(exe)s setup.py %(pure)s clean --all' + cmd = ('%(exe)s setup.py %(py3)s %(pure)s clean --all' ' build %(compiler)s --build-base="%(base)s"' ' install --force --prefix="%(prefix)s" --install-lib="%(libdir)s"' ' --install-scripts="%(bindir)s" %(nohome)s >%(logfile)s 2>&1' - % dict(exe=sys.executable, pure=pure, compiler=compiler, + % dict(exe=sys.executable, py3=py3, pure=pure, compiler=compiler, base=os.path.join(HGTMP, "build"), prefix=INST, libdir=PYTHONDIR, bindir=BINDIR, nohome=nohome, logfile=installerrs)) @@ -1045,7 +1048,7 @@ if _hgpath is not None: return _hgpath - cmd = '%s -c "import mercurial; print mercurial.__path__[0]"' + cmd = '%s -c "import mercurial; print (mercurial.__path__[0])"' pipe = os.popen(cmd % PYTHON) try: _hgpath = pipe.read().strip()