Add support for build-requirements.txt
There is a need downstream, to include python build dependencies into the python-builder image, but not the final image. For this case, we've added support for build-requirements.txt file. But need to now allow for that in Dockerfiles generated by ansible-builder.
https://github.com/ansible/python-builder-image/pull/35
In this example, setuptools_scm is needed to compile a wheel, however isn't needed by the wheel installed into the final image.
What's the interface here? A file needs to be created, /tmp/src/build-requirements.txt.
Where does that go in the process? It looks like it would be:
- User maintains another python requirements file for build requirements, separate from the existing file we support
- That gets referenced somewhere in the definition file
- Given those things, an
ADDlayer is added in thebuilderstage before the assemble script, and nothing else is needed
I think these is also required for bindeps. For example, I might need gcc + Python header files in the builder image to build a wheel, but I don't want them in the final image.