egg-info doesn't need to have contents..

This commit is contained in:
Jelmer Vernooij 2021-03-01 17:20:26 +00:00
parent 8955497adf
commit 354001c60a
No known key found for this signature in database
GPG key ID: 579C160D4C9E23E8
2 changed files with 6 additions and 6 deletions

View file

@ -259,7 +259,7 @@ def fix_missing_python_distribution(error, context): # noqa: C901
default = not targeted
pypy_pkg = context.apt.get_package_for_paths(
["/usr/lib/pypy/dist-packages/%s-.*.egg-info/PKG-INFO" % error.distribution], regex=True
["/usr/lib/pypy/dist-packages/%s-.*.egg-info" % error.distribution], regex=True
)
if pypy_pkg is None:
pypy_pkg = "pypy-%s" % error.distribution
@ -267,7 +267,7 @@ def fix_missing_python_distribution(error, context): # noqa: C901
pypy_pkg = None
py2_pkg = context.apt.get_package_for_paths(
["/usr/lib/python2\\.[0-9]/dist-packages/%s-.*.egg-info/PKG-INFO" % error.distribution],
["/usr/lib/python2\\.[0-9]/dist-packages/%s-.*.egg-info" % error.distribution],
regex=True,
)
if py2_pkg is None:
@ -276,7 +276,7 @@ def fix_missing_python_distribution(error, context): # noqa: C901
py2_pkg = None
py3_pkg = context.apt.get_package_for_paths(
["/usr/lib/python3/dist-packages/%s-.*.egg-info/PKG-INFO" % error.distribution],
["/usr/lib/python3/dist-packages/%s-.*.egg-info" % error.distribution],
regex=True,
)
if py3_pkg is None:

View file

@ -79,15 +79,15 @@ class AptRequirement(Requirement):
def get_package_for_python_package(apt_mgr, package, python_version, specs=None):
if python_version == "pypy":
pkg_name = apt_mgr.get_package_for_paths(
["/usr/lib/pypy/dist-packages/%s-.*.egg-info/PKG-INFO" % package],
["/usr/lib/pypy/dist-packages/%s-.*.egg-info" % package],
regex=True)
elif python_version == "cpython2":
pkg_name = apt_mgr.get_package_for_paths(
["/usr/lib/python2\\.[0-9]/dist-packages/%s-.*.egg-info/PKG-INFO" % package],
["/usr/lib/python2\\.[0-9]/dist-packages/%s-.*.egg-info" % package],
regex=True)
elif python_version == "cpython3":
pkg_name = apt_mgr.get_package_for_paths(
["/usr/lib/python3/dist-packages/%s-.*.egg-info/PKG-INFO" % package],
["/usr/lib/python3/dist-packages/%s-.*.egg-info" % package],
regex=True)
else:
raise NotImplementedError