<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 28, 2017, at 3:32 PM, Thomas Kluyver <<a href="mailto:thomas@kluyver.me.uk" class="">thomas@kluyver.me.uk</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">On Mon, Aug 28, 2017, at 08:20 PM, Paul Moore wrote:<br class=""><blockquote type="cite" class="">Maybe we go fully to Nick's proposal that we don't mandate any sort of<br class="">consistency constraints in the PEP. That would mean pip *has* to go<br class="">sdist->wheel (because pip does need consistent behaviour), and<br class="">xoviat's setuptools backend can skip building a sdist on the way to<br class="">building a wheel. It also means that the build_wheel hook is<br class="">essentially unreliable in isolation, and that all frontends will<br class="">likely have to do the build_sdist->build_wheel with fallback to<br class="">inplace build_wheel dance that pip does. But we expect many less<br class="">frontends than backends, so maybe that's the right trade-off?<br class=""></blockquote><br class="">I've mentioned this before, but I have little faith in our ability to<br class="">predict that one side of an interface will be far more numerous than the<br class="">other. This is partly from my experience with Jupyter, where we got that<br class="">prediction completely wrong. But I also think it's quite plausible that<br class="">many frontend tools will want to use this interface (to argue against<br class="">myself, most will be Python tools, so they could theoretically share a<br class="">common wrapper module - but I have some doubts about whether they will).<br class=""><br class="">I'm not saying we shouldn't do this - as Donald is firmly in favour and<br class="">you're wavering, it seems the easier option to wrap the discussion up.<br class="">But I'm suspicious of the rationale that *there will be fewer frontends<br class="">so they should have more responsibility*.<br class=""><br class=""></div></div></blockquote><br class=""></div><div><br class=""></div><div>I don’t see anything wrong with saying *both* sides should be doing this when they can. Backends should attempt to be consistent where possible— while recognizing that is not 100% possible in every situation (for instance, flit when you’re in an archive from <a href="http://github.com" class="">github.com</a> w/o .git).</div><div><br class=""></div><div>Likewise front ends should decide how important that is to them, which can range from “not important at all, YOLO” that just blindly calls build_wheel, to “We’d like it, but we aren’t going to mandate it” that calls build_sdist and falls back to build_wheel, and “We think this is a hard requirement” that calls build_sdist and fails if it can’t.</div><div><br class=""></div><div>My proposal isn’t exactly that I don’t trust the backends, it is that we don’t really know what the landscape is going to look at. Thus this proposal allows us to implement all three possible options without changing anything without mandating something that isn’t feasible (all backends must always be 100% consistent all the time).</div><div><br class=""></div><div>It would then be my desire that pip starts off with a pretty safe middle ground, try to build a sdist and fall back to directly building wheels that (A) helps to prevent issues where backends may have bugs or inadvertently are violating the ideal of a consistent build and (B) succeeds in most cases, even if (A) can’t be satisfied. Since we have flexibility we can then watch what happens, and if we find that a lot of problems are cropping up from inconsistent builds, then we can start talking about moving to mandating going via sdist OR if we find that the crop of build tools do a really good job and we think that we don’t really need the sanity check, migrate to just going straight to wheel.</div><div><br class=""></div><div>I think this is pretty important too, because how you want to handle not being able to create a sdist is going to be fairly task specific. Obviously if you can’t produce a sdist for a hypothetical ``twine sdist`` or ``pip sdist`` command, that is going to be a hard failure, but for ``pip install`` or ``pip wheel``, then there is a pretty reasonable argument that a fallback or straight to wheel is the correct answer.</div><div><br class=""></div><div>I also believe it is fundamentally impossible for the backends to guarantee consistency if they have a separate list for what gets installed vs what gets put into a sdist without literally building a sdist (or something similar)— and as I understand it one of the issues with that is that the tools don’t want to mandate being able to do that same logic in all situations. So I don’t think it works to say “You *must* ensure a consistent output, and I think the only thing we can do is say that you *SHOULD* try to be consistent, and leave it up to front ends to decide how seriously they take that as a requirement.</div><div><br class=""></div><div class=""><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class="">—<br class="">Donald Stufft<br class=""></div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant-ligatures: normal; font-variant-position: normal; font-variant-caps: normal; font-variant-numeric: normal; font-variant-alternates: normal; font-variant-east-asian: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>