Mercurial > public > mercurial-scm > hg-stable
diff tests/run-tests.py @ 9905:95517eb3c9a7
run-tests: work around a distutils bug triggered by 0a8a43b4ca75
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 22 Nov 2009 19:11:12 +0100 |
parents | bf9d117d0010 |
children | f139814d20b3 |
line wrap: on
line diff
--- a/tests/run-tests.py Sun Nov 22 11:27:29 2009 +0100 +++ b/tests/run-tests.py Sun Nov 22 19:11:12 2009 +0100 @@ -293,10 +293,18 @@ script = os.path.realpath(sys.argv[0]) hgroot = os.path.dirname(os.path.dirname(script)) os.chdir(hgroot) + nohome = '--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 = '' cmd = ('%s setup.py %s clean --all' ' install --force --prefix="%s" --install-lib="%s"' - ' --install-scripts="%s" --home="" >%s 2>&1' - % (sys.executable, pure, INST, PYTHONDIR, BINDIR, installerrs)) + ' --install-scripts="%s" %s >%s 2>&1' + % (sys.executable, pure, INST, PYTHONDIR, BINDIR, nohome, + installerrs)) vlog("# Running", cmd) if os.system(cmd) == 0: if not options.verbose: