291 |
291 |
292 # Run installer in hg root |
292 # Run installer in hg root |
293 script = os.path.realpath(sys.argv[0]) |
293 script = os.path.realpath(sys.argv[0]) |
294 hgroot = os.path.dirname(os.path.dirname(script)) |
294 hgroot = os.path.dirname(os.path.dirname(script)) |
295 os.chdir(hgroot) |
295 os.chdir(hgroot) |
|
296 nohome = '--home=""' |
|
297 if os.name == 'nt': |
|
298 # The --home="" trick works only on OS where os.sep == '/' |
|
299 # because of a distutils convert_path() fast-path. Avoid it at |
|
300 # least on Windows for now, deal with .pydistutils.cfg bugs |
|
301 # when they happen. |
|
302 nohome = '' |
296 cmd = ('%s setup.py %s clean --all' |
303 cmd = ('%s setup.py %s clean --all' |
297 ' install --force --prefix="%s" --install-lib="%s"' |
304 ' install --force --prefix="%s" --install-lib="%s"' |
298 ' --install-scripts="%s" --home="" >%s 2>&1' |
305 ' --install-scripts="%s" %s >%s 2>&1' |
299 % (sys.executable, pure, INST, PYTHONDIR, BINDIR, installerrs)) |
306 % (sys.executable, pure, INST, PYTHONDIR, BINDIR, nohome, |
|
307 installerrs)) |
300 vlog("# Running", cmd) |
308 vlog("# Running", cmd) |
301 if os.system(cmd) == 0: |
309 if os.system(cmd) == 0: |
302 if not options.verbose: |
310 if not options.verbose: |
303 os.remove(installerrs) |
311 os.remove(installerrs) |
304 else: |
312 else: |