This is a mostly small change albeit with addition of more embedded code from pypa/packaging to simplify supporting a requires-python check with PEP723 style syntax.