Mercurial > hg-stable
comparison setup.py @ 9124:632df73485ae
setup.py: don't pollute the current directory with temporary files
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue, 14 Jul 2009 17:18:45 -0700 |
parents | 1de6e7e1bb9f |
children | 395b0e132836 ac0f082faa6c |
comparison
equal
deleted
inserted
replaced
9123:360f61c2919f | 9124:632df73485ae |
---|---|
60 # This will have to be changed if we ever have to check | 60 # This will have to be changed if we ever have to check |
61 # for a function on Windows. | 61 # for a function on Windows. |
62 devnull = open('/dev/null', 'w') | 62 devnull = open('/dev/null', 'w') |
63 oldstderr = os.dup(sys.stderr.fileno()) | 63 oldstderr = os.dup(sys.stderr.fileno()) |
64 os.dup2(devnull.fileno(), sys.stderr.fileno()) | 64 os.dup2(devnull.fileno(), sys.stderr.fileno()) |
65 objects = cc.compile([fname]) | 65 objects = cc.compile([fname], output_dir=tmpdir) |
66 cc.link_executable(objects, os.path.join(tmpdir, "a.out")) | 66 cc.link_executable(objects, os.path.join(tmpdir, "a.out")) |
67 except: | 67 except: |
68 return False | 68 return False |
69 return True | 69 return True |
70 finally: | 70 finally: |