# HG changeset patch # User Gregory Szorc # Date 1423269185 28800 # Node ID 4bf4842767873c0f77ca50551e4f726120f76e39 # Parent 4d9c738d942f1dd2c5833c2c3dec377f0c733015 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. diff -r 4d9c738d942f -r 4bf484276787 tests/run-tests.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: