comparison tests/run-tests.py @ 24075:4bf484276787

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 06 Feb 2015 16:33:05 -0800
parents 4d9c738d942f
children 6ddc86eedc3b
comparison
equal deleted inserted replaced
24074:4d9c738d942f 24075:4bf484276787
1861 'compiler': compiler, 1861 'compiler': compiler,
1862 'base': os.path.join(self._hgtmp, "build"), 1862 'base': os.path.join(self._hgtmp, "build"),
1863 'prefix': self._installdir, 'libdir': self._pythondir, 1863 'prefix': self._installdir, 'libdir': self._pythondir,
1864 'bindir': self._bindir, 1864 'bindir': self._bindir,
1865 'nohome': nohome, 'logfile': installerrs}) 1865 'nohome': nohome, 'logfile': installerrs})
1866
1867 # setuptools requires install directories to exist.
1868 def makedirs(p):
1869 try:
1870 os.makedirs(p)
1871 except OSError, e:
1872 if e.errno != errno.EEXIST:
1873 raise
1874 makedirs(self._pythondir)
1875 makedirs(self._bindir)
1876
1866 vlog("# Running", cmd) 1877 vlog("# Running", cmd)
1867 if os.system(cmd) == 0: 1878 if os.system(cmd) == 0:
1868 if not self.options.verbose: 1879 if not self.options.verbose:
1869 os.remove(installerrs) 1880 os.remove(installerrs)
1870 else: 1881 else: