Add Git-based versioning

Temporary, to be replaced with a more robust solution (like NumPy etc.) once we
understand Python packaging better.