Yes, build_directory does not do the same thing as sdist -> unpack ->
build. It would be more likely to be useful if you are not going through
the sdist step for any reason on a tree that has been built before.

The assumption being that the back end might use src/*.py as its source,
but build/** as the source for the wheel, so that any extra files that wind
up in build/ are automatically included in the wheel. bdist_wheel does
this. SCons does not work this way, it keeps track of all the files that
should be in build/, adds only those files to the wheel, and ignores all
extra files in build/.

Perhaps you have a system that uses 'hg manifest' to create the sdist and
src/*.py to build, but you forgot to add src/newfile.py to version control.
Then sdist -> unpack -> build would tell you something.

Can we imagine a situation where a built file shows up in src/ and the
wheel but not in the sdist?

Seems like you will need to show the backend's stdout on an error whatever
the hook's return value is.

Let's say you are not using 'pip install .' for development, then you get
to validate your release artifacts some other way.

On Mon, Jul 17, 2017 at 9:54 AM Nathaniel Smith <n...@pobox.com> wrote:

> On Mon, Jul 17, 2017 at 6:36 AM, Daniel Holth <dho...@gmail.com> wrote:
> > Here's my own summary.
> >
> > pip can do build_sdist -> unpack sdist -> build wheel if it wants to,
> > serving as some kind of linter if you happen to run 'pip install .'
> during
> > development.
> >
> > build_directory provides a way to ask for a clean build, the lack of
> which
> > causes problems in bdist_wheel sometimes. It is one way to try harder to
> > generate a correct wheel, not try harder to generate a correct sdist.
>
> I would say -- build_directory provides a way to ask that the source
> tree be left clean for next time. This is unfortunately not quite the
> same. From pip's point of view, the advantages of build_sdist are
> twofold: (1) it validates the sdist building path, (2) it really does
> give a clean build.
>
> This is discussed more here:
> https://mail.python.org/pipermail/distutils-sig/2017-July/031020.html
>
> (I know you've read it, but putting the link in for future archive readers
> etc.)
>
> -n
>
> --
> Nathaniel J. Smith -- https://vorpus.org
>
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to