Extract the version information from the packaging and set it as version global. For the still supported python 3.7 this also handles the installation of the importlib-metadata package.
importlib-metadata