python: Update version logic in setup.py