inline python-for-build wrapper generation#1177
Conversation
Generate the python-for-build wrapper build-cpython.sh using a Makefile gragment to avoid patching CPython.
|
Why is this better? |
|
The primary benefit of this change is to the patches which modify Additionally, since this wrapper is unique to python-build-standalone there is no need to upstream it. Removing the patch make this clear (?). The wrapper is only used after CPython is built and installed, it is a post-build requirement when cross-compiling. I would not consider this change critical. If the patch is more clear this should not be merged. |
|
Perhaps we should back up a little, what is this for? |
|
After building and installing CPython, an interpreter is needed to:
In a native build, the newly installed Python interpreter can be used for these tasks. When cross-compiling, the new interpreter targets a different architecture and may not run on the build system (for example, a RISC-V interpreter on an x86-64 host). CPython handles this during the build using the The previous patches, and now the inline Makefile snippet, create a |
|
Why is this only useful to us and not other redistributors? |
I was just writing this up 😄 There is also an argument for this wrapper to be upstreamed to CPython as other projects that do cross-builds and then run Python tooling against the the target install would benefit from this wrapper. That said, this is a narrow use-case which may not warrant upstream-support. |
Generate the python-for-build wrapper build-cpython.sh using a Makefile fragment to avoid patching CPython. This functionality is only used post-install. It is not needed during the build.
closes #959
closes #867