Reverse logic of figuring out the version number

I'd recommend specifying version string in packaging metadata and access that information at runtime via setuptools api.