setup.py fixes for the `make_refs` branch from Eoghan Murray