[setuptools] Fix Broken Build & Improve Fuzz Harness
Fixes Issue 68958: setuptools: Fuzzing Build Failure
Fixes the setuptools fuzzer builds that have been broken since May 12, 2024.
Key Changes
-
Pyinstaller Upgrade: Updated Pyinstaller to version 3.10.0, which is the minimum version supporting setuptools >= 71.0.0. This upgrade addresses the new dependency vendoring approach in setuptools. For more details, refer to the setuptools history.
-
Tomli Import Fix: Replaced the
tomliimport fromsetuptools.externwith a direct import. This change resolves theModuleNotFoundError: No module named 'setuptools.extern'exception. Usingsetuptools.externfor imports is discouraged, as noted in pypa/setuptools#4498.
Additional Improvements
-
Dictionary Addition: Added a dictionary for setuptools fuzz harnesses.
-
Fuzzer Optimization: Improved fuzzer cold-start time by using
atheris.instrument_importsinstead ofatheris.instrument_all. For additional details on other minor changes, see commit e01e5aeb3da0e55cec36887f5adda32b97dc2256. -
Docker Image Enhancement: Cached the cloned dependency during the Docker image build step.
DaveLak is a new contributor to projects/setuptools. The PR must be approved by known contributors before it can be merged.
@DavidKorczynski Could you please help double-check this? Thank you : )
Gentle ping @DavidKorczynski, thanks!
I'll take a look at this in detail tomorrow!