1try: 2 from pkg_resources import get_distribution, DistributionNotFound 3 __version__ = get_distribution("ttfautohint-py").version 4except (ImportError, DistributionNotFound): 5 # either pkg_resources is missing or package is not installed 6 import warnings 7 warnings.warn( 8 "'ttfautohint-py' is missing the required distribution metadata. " 9 "Please make sure it was installed correctly.", UserWarning, 10 stacklevel=2) 11 __version__ = "0.0.0" 12