From e4b2d0baf3b537582bd05d6106f0c74198c3dc66 Mon Sep 17 00:00:00 2001 From: David Lakin Date: Thu, 2 May 2024 11:01:22 -0400 Subject: [PATCH] infra: Upgrade setuptools to version explicitly required by pyinstaller (#11743) Fixes Issue: #11742 ## TL;DR Pyinstaller requires `'setuptools>=42.0.0'` to properly detect "hidden import" module dependencies of a particular package that it is unable to determine through conventional means. `'setuptools==42.0.2'` was chosen here to: - keep with the convention used in this file of pinning specific versions as apposed to minimums/ranges. - introduce the smallest major version bump possible to minimize introduction of changes that are not specific to the pyinstaller issue this aims to fix. I've tested this on a few projects locally but wasn't sure how to effectively test against all of the python projects locally, so I haven't :( ### Broken Builds This Fixes These are a few projects (note that there might be more, this is a subset I tested locally) - https://introspector.oss-fuzz.com/project-profile?project=connexion - https://introspector.oss-fuzz.com/project-profile?project=adal - https://introspector.oss-fuzz.com/project-profile?project=gcp-python-cloud-storage - https://introspector.oss-fuzz.com/project-profile?project=g-cloud-logging-py - https://introspector.oss-fuzz.com/project-profile?project=h5py - https://introspector.oss-fuzz.com/project-profile?project=httplib2 - https://introspector.oss-fuzz.com/project-profile?project=msal - https://introspector.oss-fuzz.com/project-profile?project=looker-sdk - https://introspector.oss-fuzz.com/project-profile?project=pyzmq --- infra/base-images/base-builder/install_python.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infra/base-images/base-builder/install_python.sh b/infra/base-images/base-builder/install_python.sh index ea50e7c44..01403eae3 100755 --- a/infra/base-images/base-builder/install_python.sh +++ b/infra/base-images/base-builder/install_python.sh @@ -19,5 +19,5 @@ echo "ATHERIS INSTALL" unset CFLAGS CXXFLAGS # PYI_STATIC_ZLIB=1 is needed for installing pyinstaller 5.0 export PYI_STATIC_ZLIB=1 -LIBFUZZER_LIB=$( echo /usr/local/lib/clang/*/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a ) pip3 install -v --no-cache-dir "atheris>=2.1.1" "pyinstaller==5.0.1" "coverage==6.3.2" +LIBFUZZER_LIB=$( echo /usr/local/lib/clang/*/lib/x86_64-unknown-linux-gnu/libclang_rt.fuzzer_no_main.a ) pip3 install -v --no-cache-dir "atheris>=2.1.1" "pyinstaller==5.0.1" "setuptools==42.0.2" "coverage==6.3.2" rm -rf /tmp/*