Close file handles in setup.py