Bug 261082
| Summary: | AutoInstaller needs PEP 517 build system support (don't use `setup.py build`) | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Sam Sneddon [:gsnedders] <gsnedders> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | NEW | ||
| Severity: | Normal | CC: | cklim4101, fujii.hironori, jbedard, mcatanzaro, 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=261113 https://bugs.webkit.org/show_bug.cgi?id=263299 https://bugs.webkit.org/show_bug.cgi?id=289909 |
||
Sam Sneddon [:gsnedders]
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).
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Michael Catanzaro
So https://github.com/WebKit/WebKit/pull/17201 uses this version of bs4 and it works for me. That's strange.
Sam Sneddon [:gsnedders]
(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
Sam Sneddon [:gsnedders]
BS4 does always have a wheel, so if we simply oblige it to install from the wheel it should work, I think.
Sam Sneddon [:gsnedders]
Let's make this more generic than just BS4, and just use this for the entire build support issue.
Radar WebKit Bug Importer
<rdar://problem/134102588>
Sam Sneddon [:gsnedders]
If we're using build, we probably need to implement our own isolated env that installs things via the AutoInstaller: https://build.pypa.io/en/stable/api.html#build.env.DefaultIsolatedEnv