Browse Source

Avoid opening the file twice

master
Isuru Fernando 5 years ago committed by Wenzel Jakob
parent
commit
4a08067caf
  1. 2
      setup.py

2
setup.py

@ -40,7 +40,7 @@ def has_flag(compiler, flagname):
""" """
import tempfile import tempfile
import os import os
with tempfile.NamedTemporaryFile('w', suffix='.cpp') as f: with tempfile.NamedTemporaryFile('w', suffix='.cpp', delete=False) as f:
f.write('int main (int argc, char **argv) { return 0; }') f.write('int main (int argc, char **argv) { return 0; }')
fname = f.name fname = f.name
try: try:

Loading…
Cancel
Save