Skip to content

Commit

Permalink
[svn r3415] if you can't write to cwd, write to /tmp
Browse files Browse the repository at this point in the history
--HG--
branch : trunk
  • Loading branch information
ianb committed May 13, 2008
1 parent 8c44e3d commit 35f0f3c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/index.txt
Expand Up @@ -255,6 +255,7 @@ svn trunk
* Fix MacPorts Python
* Added --unzip-setuptools option
* Update to Setuptools 0.6c8
* If the current directory is not writable, run ez_setup.py in ``/tmp``

1.0
~~~
Expand Down
6 changes: 5 additions & 1 deletion virtualenv.py
Expand Up @@ -256,10 +256,14 @@ def install_setuptools(py_executable, unzip=False):
cmd.extend(['--always-copy', '-U', 'setuptools'])
logger.start_progress('Installing setuptools...')
logger.indent += 2
cwd = None
if not os.access(os.getcwd(), os.W_OK):
cwd = '/tmp'
try:
call_subprocess(cmd, show_stdout=False,
filter_stdout=filter_ez_setup,
extra_env=env)
extra_env=env,
cwd=cwd)
finally:
logger.indent -= 2
logger.end_progress()
Expand Down

0 comments on commit 35f0f3c

Please sign in to comment.