[Distutils] Fwd: Re: PEP 517 again

Thomas Kluyver thomas at kluyver.me.uk
Fri Aug 25 06:16:06 EDT 2017


Thanks Paul,

On Fri, Aug 25, 2017, at 10:45 AM, Paul Moore wrote:
> I'd *also* expect that the wheel built (and hence what gets installed)
> would be the same as what you'd get if the user added write
> permissions and then ran the command. That's part of what I mean by
> direct wheel and sdist->wheel being equivalent. I'd completely support
> any user who complained that getting different results in those 2
> cases is a bug in the backend. But as Nick pointed out, this is
> probably more detail than we need in the PEP.

Agreed.

> > Frontends which wish to ensure this consistency may call build_sdist
> > (see below) first, and then call build_wheel in the unpacked sdist. But
> > if build_sdist fails with NotImplementedError, they will fall back to
> > calling build_wheel in the source directory, and rely on the backend to
> > produce an equivalent wheel.
> 
> This seems to contradict the previous point - I'd rephrase it as
> "Frontends which want to protect against backends violating this
> expectation may call build_sdist..." and at that point it starts to
> seem like excessive paranoia on the part of frontends.

Your wording is fine by me - I was struggling to find the right phrasing
there.

> I repeat my earlier comment here - do we have any actual cases where
> we expect in-place wheel builds to *not* enforce the equivalence? 

Flit cannot strictly enforce it if it can't build an sdist: with the way
I've chosen to do sdists, it's not possible to know what would be in an
sdist in the case where we can't build one.

The 'on-label' use case for flit is packages with no built or generated
parts. All of the modules and data files inside the package should be
checked in to version control, which means they would be included in an
sdist. I don't think I can technically stop people from running a
separate step to generate files before building a wheel, but I'd
consider that creative misuse of flit.

(There is a discussion issue open - #119 - about adding support for
build steps in flit. If we decide to do that, the situation will change,
but that's some way off even if we do do it)

Thomas


More information about the Distutils-SIG mailing list