[PATCH] run-tests: define more arguments when building with distutils
Dan Villiom Podlaski Christiansen
danchr at gmail.com
Tue Nov 17 06:32:03 CST 2009
# HG changeset patch
# User Dan Villiom Podlaski Christiansen <danchr at gmail.com>
# Date 1258460698 -3600
# Node ID 55d63ff208aaeb20a078878c4cd2e572eae771b4
# Parent 1da7b76d6adc13f0823ce819fa53ce7c7f4cfc79
run-tests: define more arguments when building with distutils.
--home fixes building with it set in ~/.pydistutils.cfg.
--install-data is for possible future usage.
diff --git a/tests/run-tests.py b/tests/run-tests.py
--- a/tests/run-tests.py
+++ b/tests/run-tests.py
@@ -293,8 +293,9 @@ def installhg(options):
os.chdir(hgroot)
cmd = ('%s setup.py %s clean --all'
' install --force --prefix="%s" --install-lib="%s"'
- ' --install-scripts="%s" >%s 2>&1'
- % (sys.executable, pure, INST, PYTHONDIR, BINDIR, installerrs))
+ ' --install-scripts="%s" --install-data="%s" --home="" >%s 2>&1'
+ % (sys.executable, pure, INST, PYTHONDIR, BINDIR, DATADIR,
+ installerrs))
vlog("# Running", cmd)
if os.system(cmd) == 0:
if not options.verbose:
@@ -782,7 +783,7 @@ def main():
os.environ["EMAIL"] = "Foo Bar <foo.bar at example.com>"
os.environ['CDPATH'] = ''
- global TESTDIR, HGTMP, INST, BINDIR, PYTHONDIR, COVERAGE_FILE
+ global TESTDIR, HGTMP, INST, BINDIR, DATADIR, PYTHONDIR, COVERAGE_FILE
TESTDIR = os.environ["TESTDIR"] = os.getcwd()
if options.tmpdir:
options.keep_tmpdir = True
@@ -823,11 +824,12 @@ def main():
# "hg" specified by --with-hg is not the only Python script
# executed in the test suite that needs to import 'mercurial'
# ... which means it's not really redundant at all.
- PYTHONDIR = BINDIR
+ DATADIR = PYTHONDIR = BINDIR
else:
INST = os.path.join(HGTMP, "install")
BINDIR = os.environ["BINDIR"] = os.path.join(INST, "bin")
PYTHONDIR = os.path.join(INST, "lib", "python")
+ DATADIR = os.path.join(INST, "share")
os.environ["BINDIR"] = BINDIR
os.environ["PYTHON"] = PYTHON
More information about the Mercurial-devel
mailing list