From: John Mulligan Date: Fri, 14 Jul 2023 19:41:54 +0000 (-0400) Subject: cephadm: disable wheels and C compilers when building cephadm zipapp X-Git-Tag: v19.0.0~153^2~14 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=a375e5d9aa87c0409940388bda382252a81e4936;p=ceph-ci.git cephadm: disable wheels and C compilers when building cephadm zipapp We can not rely on any particular python version (py 3.6+ is supported) and can not assume any particular architecture. So using wheels based on the build system is pointless. Installing binary .so files compiled from C/C++ similarly so. Attempt to block the behaviors when adding dependencies to the zipapp. Signed-off-by: John Mulligan --- diff --git a/src/cephadm/build.py b/src/cephadm/build.py index 0680abad21a..f5a2ce27479 100755 --- a/src/cephadm/build.py +++ b/src/cephadm/build.py @@ -120,6 +120,11 @@ def _install_deps(tempdir): """Install dependencies with pip.""" # TODO we could explicitly pass a python version here log.info("Installing dependencies") + # best effort to disable compilers, packages in the zipapp + # must be pure python. + env = os.environ.copy() + env['CC'] = '/bin/false' + env['CXX'] = '/bin/false' # apparently pip doesn't have an API, just a cli. subprocess.check_call( [ @@ -127,11 +132,14 @@ def _install_deps(tempdir): "-m", "pip", "install", + "--no-binary", + ":all:", "--requirement", "requirements.txt", "--target", tempdir, - ] + ], + env=env, )