setup.py: don't pollute the current directory with temporary files
authorBryan O'Sullivan <bos@serpentine.com>
Tue, 14 Jul 2009 17:18:45 -0700
changeset 9124 632df73485ae
parent 9123 360f61c2919f
child 9126 64994005bcb7
child 9140 ac0f082faa6c
setup.py: don't pollute the current directory with temporary files
setup.py
--- a/setup.py	Tue Jul 14 16:50:37 2009 -0700
+++ b/setup.py	Tue Jul 14 17:18:45 2009 -0700
@@ -62,7 +62,7 @@
             devnull = open('/dev/null', 'w')
             oldstderr = os.dup(sys.stderr.fileno())
             os.dup2(devnull.fileno(), sys.stderr.fileno())
-            objects = cc.compile([fname])
+            objects = cc.compile([fname], output_dir=tmpdir)
             cc.link_executable(objects, os.path.join(tmpdir, "a.out"))
         except:
             return False