[Distutils] A possible refactor/streamlining of PEP 517

Thomas Kluyver thomas at kluyver.me.uk
Tue Jul 4 13:35:45 EDT 2017


On Tue, Jul 4, 2017, at 06:24 PM, Donald Stufft wrote:
> It occurs to me that your case here is actually a reason *not* to
> implement this hook. The goal of the hook is that the wheel built from
> the tree created by copying this file is the same as the wheel built
> from a sdist created from that same VCS directory. However if you
> require the VCS tools in order to decide what files to include in the
> sdist, then you also need those tools to decide what files to copy
> into the temporary directory. Otherwise you’ll get different outputs.
The function of the VCS is to identify extra files that are needed for
an sdist that don't affect building a wheel (like docs and tests). It's
easy for flit to identify everything necessary for building a wheel, but
those things are not sufficient for a good sdist.
> Maybe the problem boils down to the fact we’re trying to treat VCS
> directories and unpacked Sdists the same and maybe we should just add
> a file which *only* gets added to a sdist (e.g. not a development
> install or a wheel) similar to the .dist-info/WHEEL file that just
> acts as a marker for “Hey, I’m in an sdist”> 

"Hey, I'm in something which was once an sdist,  but may no longer be
clean. Or someone has copied the marker file into a directory that
was never an sdist to make something work because for some reason
there's a difference in behaviour for directories that pip thinks
come from sdists."
> 
> and if we hit that, then pip just does the copytree implementation.
> That absolves build backends from needing to worry about the unpacked
> sdist case, but makes it still function in 100% of the cases (assuming
> the build backend produces a correct sdist).
It still doesn't deal with the cases where you're not coming from an
sdist but you can't get the VCS info for whatever reason.
We had reached a compromise that we all seemed to be OK with - albeit
not very keen on. I find it very frustrating that we seem to be
rehashing the same arguments that got us there in the first place.
Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20170704/63500276/attachment.html>


More information about the Distutils-SIG mailing list