Sounds like an unfortunate side effect of using distutils instead of a better build system. If they were using enscons the wheel generation would be entirely driven by a manifest or a series of glob patterns, and it would not matter if there were any extra files in the build directory. As long as the .pyc file was not listed as a dependency of the final build artifact, it would not have been included in the wheel.
On Wed, Jun 14, 2017 at 4:51 PM Donald Stufft <don...@stufft.io> wrote: > > On Jun 12, 2017, at 9:27 PM, Nick Coghlan <ncogh...@gmail.com> wrote: > > > 5) Drop the prepare_files hook > Rationale: it's purpose is somewhat unclear at this point, and it > gives up the main advantage of going through sdist (the guarantee that > building from sdist and building from unpacked tree give the same > results) while still having the main disadvantages (you have to copy > everything and lose incremental rebuilds). > > > The main reason this made it into the PEP is that build_sdist may have > additional dependencies that prepare_build_files doesn't (e.g. Thomas > has indicated that flit needs to call out to VCS tools to build a full > sdist, but can export its own input files directly). > > So while it's technically a "make it faster" hook rather than an > essential "make it right" hook, I think just smoothing out the > interaction between pip & flit specifically provides sufficient value > to make it worth including in the initial version of the > specification. > > > > Just as an anecdote, today requests pushed a brown paper bag release > because they created a wheel out of a checkout of the requests repository, > which happened to have some .pyc files and directories left over from git > and some refactoring. This caused the library to be completely broken as > released in the wheel. This is the kind of error that creating a sdist > ideally hopes to eliminate (and hopefully the make it faster hook doesn’t > end up invalidating that point). > > — > > Donald Stufft > _______________________________________________ > Distutils-SIG maillist - Distutils-SIG@python.org > https://mail.python.org/mailman/listinfo/distutils-sig >
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org https://mail.python.org/mailman/listinfo/distutils-sig