[Webkit-unassigned] [Bug 261113] New: Fix (gone-in-Python-3.12) distutils calls in setup.py from AutoInstaller
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Mon Sep 4 07:15:42 PDT 2023
https://bugs.webkit.org/show_bug.cgi?id=261113
Bug ID: 261113
Summary: Fix (gone-in-Python-3.12) distutils calls in setup.py
from AutoInstaller
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: gsnedders at apple.com
CC: jbedard at apple.com, mcatanzaro at redhat.com
Blocks: 260877
In Python 3.12, distutils is gone.
Well, sorta. setuptools nowadays provides a distutils package to provide backwards compatibility—but `import distutils` will fail if `setuptools` hasn't been imported first, which means the AutoInstaller will fail to install a variety of packages.
Specifically:
Installing MarkupSafe-1.1.1...
Traceback (most recent call last):
File "/tmp/markupsafe-311492/MarkupSafe-1.1.1/setup.py", line 6, in <module>
from distutils.errors import CCompilerError
ModuleNotFoundError: No module named 'distutils'
Installing zope-interface-5.1.0...
Traceback (most recent call last):
File "/tmp/zope.interface-311492/zope.interface-5.1.0/setup.py", line 25, in <module>
from distutils.errors import CCompilerError
ModuleNotFoundError: No module named 'distutils'
Installing selenium-3.141.0...
Traceback (most recent call last):
File "/tmp/selenium-311492/selenium-3.141.0/setup.py", line 20, in <module>
from distutils.command.install import INSTALL_SCHEMES
ModuleNotFoundError: No module named 'distutils'
Installing jeepney-0.7.1...
Traceback (most recent call last):
File "/tmp/jeepney-311492/jeepney-0.7.1/setup.py", line 4, in <module>
from distutils.core import setup
ModuleNotFoundError: No module named 'distutils'
Installing cffi-1.15.1...
Traceback (most recent call last):
File "/tmp/cffi-311492/cffi-1.15.1/setup.py", line 148, in <module>
ask_supports_thread()
File "/tmp/cffi-311492/cffi-1.15.1/setup.py", line 75, in ask_supports_thread
config = get_config()
^^^^^^^^^^^^
File "/tmp/cffi-311492/cffi-1.15.1/setup.py", line 68, in get_config
from distutils.core import Distribution
ModuleNotFoundError: No module named 'distutils'
Installing entrypoints-0.3.0...
Traceback (most recent call last):
File "/tmp/entrypoints-311492/entrypoints-0.3/setup.py", line 4, in <module>
from distutils.core import setup
ModuleNotFoundError: No module named 'distutils'
Some of these have upstream releases which fix this, but some don't. And with setup.py deprecated, many of these packages are moving further away from what we support in the AutoInstaller today (c.f. bug 261082).
There's a few possible paths forward, in decreasing levels of hackiness:
* Move to relying on pip to download/build/install packages, and get out of all of those games entirely.
* Implement a PEP 517 compliant builder (i.e., fix bug 261082).
* Hardcode usage of (the default PEP 517 builder) setuptools.build_meta.__legacy__ to build all packages (which will solve the above problems, as the setuptools legacy builder keeps them working).
* Tokenize/untokenize setup.py files to add a setuptools import at the top.
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=260877
[Bug 260877] Cannot run test-webkitpy: errors when installing many pypi dependencies with python 3.12
--
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/20230904/10c6a7ab/attachment.htm>
More information about the webkit-unassigned
mailing list