Bug 261082

Summary: AutoInstaller unable to install beautifulsoup4 4.12.2 (no PEP 517 build system support)
Product: WebKit Reporter: Sam Sneddon [:gsnedders] <gsnedders>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: Hironori.Fujii, jbedard, mcatanzaro
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=261113
https://bugs.webkit.org/show_bug.cgi?id=263299

Description Sam Sneddon [:gsnedders] 2023-09-03 05:06:42 PDT
This packages relies on PEP 517 (https://peps.python.org/pep-0517/) being properly implemented; while Jonathan implemented a hackish workaround with bug 253066 that works for some packages, it doesn't work for bs4 which declares in its pyproject.toml:

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"

I still feel like us having to reimplement more and more of the Python packaging ecosystem is likely fragile, and we should simply leverage more existing tools (whether by calling pip from the autoinstaller, or by vendoring packages such as build).
Comment 1 Michael Catanzaro 2023-09-03 07:10:54 PDT
So https://github.com/WebKit/WebKit/pull/17201 uses this version of bs4 and it works for me. That's strange.
Comment 2 Sam Sneddon [:gsnedders] 2023-09-03 07:52:41 PDT
(In reply to Michael Catanzaro from comment #1)
> So https://github.com/WebKit/WebKit/pull/17201 uses this version of bs4 and
> it works for me. That's strange.

My first guess is somehow our hacky workaround from bug 253066 suffices with the version of setuptools we have on Python 3.8+: https://github.com/WebKit/WebKit/blob/5ea837d2ce2e325744ef5d63d11e1c41e8a2c5e8/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/__init__.py#L61-L62