Bug 261947

Summary: [AutoInstall] package install can fail due to dependency checking
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: jbedard, m_finkel, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=261893

Description Sam Sneddon [:gsnedders] 2023-09-22 07:51:36 PDT
Trying to run https://github.com/WebKit/WebKit/pull/17351 I've run into:

Downloading dnslib-0.9.23...
Installing dnslib-0.9.23...
Traceback (most recent call last):
  File "/var/folders/qk/hmjj9_lx2cg3_4v3vx3y7y_w0000gn/T/dnslib-62794/dnslib-0.9.23/setup.py", line 38, in <module>
    setup(name='dnslib',
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/__init__.py", line 153, in setup
    return distutils.core.setup(**attrs)
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/_distutils/core.py", line 108, in setup
    _setup_distribution = dist = klass(attrs)
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/dist.py", line 434, in __init__
    _Distribution.__init__(self, {
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/_distutils/dist.py", line 293, in __init__
    self.finalize_options()
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/dist.py", line 742, in finalize_options
    for ep in sorted(eps, key=by_order):
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/setuptools/dist.py", line 741, in <lambda>
    eps = map(lambda e: e.load(), pkg_resources.iter_entry_points(group))
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/pkg_resources/__init__.py", line 2449, in load
    self.require(*args, **kwargs)
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/pkg_resources/__init__.py", line 2472, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/autoinstalled/python-3-arm64/pkg_resources/__init__.py", line 772, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pyparsing!=3.0.5,>=2.0.2' distribution was not found and is required by packaging
Failed to install dnslib-0.9.23!

Seemingly, setuptools is checking that requirements are satisfied for installed distributions, and finding that they in fact are not. This is because the AutoInstaller doesn't pay any attention to requirements whatsoever, and we merely rely on the distribution later importing another package we know of (and then installing it then) or via implicit_deps.
Comment 1 Sam Sneddon [:gsnedders] 2023-09-22 09:01:37 PDT
This seems to be happening within:

 EntryPoint.parse('setuptools_scm = setuptools_scm.integration:infer_version')

Likely a regression from bug 261893?
Comment 2 Sam Sneddon [:gsnedders] 2023-09-22 09:02:22 PDT
(Or rather, this specific instance of the bug is caused by that — the underlying problem of not installing requirements has existed as long as the autoinstaller.)
Comment 3 Radar WebKit Bug Importer 2023-09-29 07:52:14 PDT
<rdar://problem/116237345>