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 <jmulligan@redhat.com>
"""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(
[
"-m",
"pip",
"install",
+ "--no-binary",
+ ":all:",
"--requirement",
"requirements.txt",
"--target",
tempdir,
- ]
+ ],
+ env=env,
)