[Webkit-unassigned] [Bug 261113] Fix (gone-in-Python-3.12) distutils calls in setup.py from AutoInstaller

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Oct 3 18:35:49 PDT 2023


https://bugs.webkit.org/show_bug.cgi?id=261113

Sam Sneddon [:gsnedders] <gsnedders at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |bfan2 at apple.com

--- Comment #3 from Sam Sneddon [:gsnedders] <gsnedders at apple.com> ---
Ahhhh, I'd failed to realised how this worked with setuptools's vendored distutils (via _distutils_hack).

So setuptools installs a `distutils-precedence.pth`, which makes setuptools' provided distutils get exposed as distutils.

Thus, naturally, you'd expect this to work, but pth files are only processed for site directories (i.e., site-packages directories), and _not_ for any paths added to sys.path via the PYTHONPATH environment variable (as we use to invoke setup.py).

This feels like another reason to move to using a venv for the AutoInstaller.

See https://github.com/web-platform-tests/wpt/blob/9eb816722861f5f12f46738c9591f4c88aa0e995/tools/wpt/virtualenv.py#L99-L137 for code that roughly self-activates a venv within the running interpreter.

I guess there's no reason why we can't just do this on Python 3 in the near future (where the venv module already exists), though it will trigger reinstalls (again). Might be worth to land alongside Bug 224669 to avoid multiple cases of reinstalling the world.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20231004/edfd492f/attachment.htm>


More information about the webkit-unassigned mailing list