fix ResourceWarning in setup.py

found with python -Wd setup.py test