Switch pkg_resources to use code taken from packaging for PEP 440