Fix/setup.py

This superseeds #361 and #365