Re: [Distutils] Notes on pip's requirements for PEP 517
On Jul 17, 2017 8:48 AM, "Paul Moore"
On Mon, Jul 17, 2017 at 6:42 AM, Daniel Holth
wrote: A minor detail for pip strategy option #2 is that sdists do not have to have PKG-INFO.
...should they be required to have PKG-INFO? This seems like a relevant question regardless of whether pip goes with "strategy option #2" :-).
A note of caution here - this way lies (at least some level) of defining an official sdist format. I'm not against that (specifically, I'd be happy if we did that, just formalising what setuptools currently does in some usable form, and leave any sort of "sdist 2.0" debate for when we've all got our breath back after this discussion) but I'll note that we went round this loop very early on here (which resulted in the PEP being written in terms of "source trees") so we need to be careful not to go back over old ground. There's already a short paragraph that gives some minimal requirements on sdists; we needed it for build_sdist. Now that I look again though, it turns out that it already mandates the presence of PKG-INFO. -n
On 18 July 2017 at 12:28, Nathaniel Smith
On Jul 17, 2017 8:48 AM, "Paul Moore"
wrote: On 17 July 2017 at 14:45, Nathaniel Smith wrote: ...should they be required to have PKG-INFO? This seems like a relevant question regardless of whether pip goes with "strategy option #2" :-).
A note of caution here - this way lies (at least some level) of defining an official sdist format. I'm not against that (specifically, I'd be happy if we did that, just formalising what setuptools currently does in some usable form, and leave any sort of "sdist 2.0" debate for when we've all got our breath back after this discussion) but I'll note that we went round this loop very early on here (which resulted in the PEP being written in terms of "source trees") so we need to be careful not to go back over old ground.
There's already a short paragraph that gives some minimal requirements on sdists; we needed it for build_sdist. Now that I look again though, it turns out that it already mandates the presence of PKG-INFO.
Right, PEP 517 says that sdists created via the build_sdist hook
should contain PKG-INFO. However, that's not the problematic case for
sdist detection in frontends: the problem is that there's nothing
stopping people from having a PKG-INFO file lying around in a
directory that *isn't* an unpacked sdist (whether deliberately or
accidentally).
This is what leads to the situation where I expect PEP 517 *backends*
are going to be able to more reliably check for an unpacked sdist: as
tools chosen specifically by software publishers, they will have more
freedom to say "
participants (2)
-
Nathaniel Smith
-
Nick Coghlan