run-tests: ensure install directories exist
As part of the transition to setuptools, it was discovered that
setuptools doesn't create install directories for you where distutils
apparently did. This was causing run-tests.py to fail when creating the
temporary hg install.
We work around this problem by creating the install directories before
running setup.py.
--- a/tests/run-tests.py Fri Feb 06 16:15:02 2015 -0800
+++ b/tests/run-tests.py Fri Feb 06 16:33:05 2015 -0800
@@ -1863,6 +1863,17 @@
'prefix': self._installdir, 'libdir': self._pythondir,
'bindir': self._bindir,
'nohome': nohome, 'logfile': installerrs})
+
+ # setuptools requires install directories to exist.
+ def makedirs(p):
+ try:
+ os.makedirs(p)
+ except OSError, e:
+ if e.errno != errno.EEXIST:
+ raise
+ makedirs(self._pythondir)
+ makedirs(self._bindir)
+
vlog("# Running", cmd)
if os.system(cmd) == 0:
if not self.options.verbose: