[Distutils] PEP 517 - a plan of action

Paul Moore p.f.moore at gmail.com
Sun Aug 27 09:00:22 EDT 2017


On 27 August 2017 at 12:03, Thomas Kluyver <thomas at kluyver.me.uk> wrote:
> I believe that the remaining questions are:
> - srcdir-on-sys.path
> - Notimplemented/Error (/None)
>
> Unfortunately, it's not clear to me what's the 'simplest' solution on
> either, and we can't easily change whichever decision we make. Nathaniel
> & Nick still disagree on srcdir-on-sys.path, I believe; I'm not sure how
> we resolve that.
>
> I still think the NotImplemented/Error issue is a prime example of
> bikeshedding. There clearly isn't one 'right' way to do it, because
> intelligent people continue to disagree about it. I'd like somebody to
> make the decision and end the argument, but I'm not sure who is 'above
> the fray' enough to be able to do that.

My feeling on this one (and I know, I'm biased here) is that Guido's
suggestion of returning None to mean "couldn't build a sdist" is the
simplest solution, at least for now. Initial frontend code will be

    sdist_path = build_sdist(...)
    if sdist_path is None:
        deal with no sdist

and that's easy enough to modify to either

    sdist_path = build_sdist(...)
    if sdist_path is None or sdist_path is NotImplemented:
        deal with no sdist

or

    try:
        sdist_path = build_sdist(...)
        # Backward compatibility
        if sdist_path is None:
            raise NotImplementedError
    except NotImplementedError:
        deal with no sdist


Add to that the fact that I'm suggesting that there mightn't even be
any call to build_sdist in pip, at least in the first instance, and it
doesn't seem worth doing anything more complex for now.

On the srcdir-on-sys.path question, I don't really have a good answer.
It's part of the discussion I've been skimming/skipping - and the fact
that I have been is one of the things that prompted me to make this
suggestion. If you want, I'll go back and re-read the posts and see
what my view is - but you may be happier if I don't add yet another
viewpoint to confuse things further ;-)

Paul


More information about the Distutils-SIG mailing list