Commits

Anonymous committed 303a2a1

[svn r3415] if you can't write to cwd, write to /tmp

Comments (0)

Files changed (2)

 * 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
 ~~~
         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()