Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adjust compiler options used to build Python
In order to improve parity with the upstream Docker Hub Python image builds, the build scripts used for our Python binary builds have been adjusted as follows: - The Ubuntu security hardening compiler/linker flags are now retrieved using `dpkg-buildflags` and passed to the `make` invocation. See: - https://wiki.ubuntu.com/ToolChain/CompilerFlags - https://wiki.debian.org/Hardening - docker-library/python#810 - Configure is now called with an explicit `--build` architecture. - The directory into which Python is installed during packaging has been changed to make it clearer that this it is only a temporary packaging path (and so why this path doesn't match that used in the CNB for example), since Python is relocated by both this buildpack and the CNB into different locations. After these changes, our compiler/linker options are now closer to: https://github.com/docker-library/python/blob/330331fbe3c8d19befaba10ee329c5bf3a9dc225/3.12/slim-bookworm/Dockerfile#L70-L89 These changes are being made now since we'll soon be generating new Python binaries/archives under a new URL structure, which will provide a safer/more convenient transition point to switching to these new compiler options (vs overwriting the existing archives on S3, or only making this change for new Python releases onwards). GUS-W-14217295.
- Loading branch information