refactored setup.py for a regular build