[Distutils] PEP 517: Build frontend responsibilities
12345 67890
xoviat at gmail.com
Thu Aug 17 12:05:01 EDT 2017
All:
After reviewing the PEP, I personally feel that it relies too much on the backend Doing The Right Thing. As it currently stands, it is my understanding that the build backend is called in the source directory and is then responsible for handling the entire process to build a compliant wheel. In a PEP 517 world, the build backends may be poorly written initially and may not fully comply with the PEP’s goal to produce the same wheel that would be produced from an sdist.
Current process:
- Frontend calls backend in source directory build-wheel
Proposed process:
- Frontend copies source tree to temporary directory
- Frontend invokes build-sdist to build an sdist
- Frontend extracts sdist to new temporary directory
- Frontend reloads backend from sdist directory and invokes build-wheel
The proposed process is more computationally intensive, but moves compliance logic out of the build backend. In addition, we can make some modifications based on this proposed process:
- Remove parameter for build_dir in build_wheel since it is always the current directory
- Optimization: add new parameter to build_sdist called copy_extra, that when set to false, only includes files in sdist needed to build a wheel.
- Specify that build_wheel should fail if PKG-INFO is not present so that it is always invoked in an sdist
I realized that I may have pushed to have this completed earlier, but I agree with Donald that we need to enforce a process rather than hoping for the best.
Regards,
xoviat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170817/ac629f49/attachment.html>
More information about the Distutils-SIG
mailing list