[Distutils] What is the official position on distutils?

Sylvain Corlay sylvain.corlay at gmail.com
Sun Sep 4 10:27:15 EDT 2016


Hi Steve,

- I posted an on setuptools github https://github.com/pypa/
setuptools/issues/771 to ask the setuptools folks (and especially Jason)
whether they would want such a feature.

I still find it baffling that the preferred way to add distutils features
would be to monkey-patch it via setuptools first and then to add it into
distutils later, while my proposed approach was to add it to distutils and
monkey patch for earlier versions of python.

- Regarding the policy that you just nominated, does this apply to things
that have been in pip for a long time? In the initial email that triggered
this discussion, it was also question of adding the
`pip.location.distutils_scheme`
convenience function to distutils itself. Cf
https://bugs.python.org/issue26955 and pip's implementation at
https://github.com/pypa/pip/blob/281eb61b09d87765d7c2b92f6982b3fe76ccb0af/pip/locations.py#L124

Indeed, the problem with certain distutils commands like `install_headers`
is that the only way to retrieve the directory where things were installed
is to instantiate a `distutils.dist.Distribution`
object, which is not trivial to do. pip's distutils_scheme convenience
function does it. This function is *about* distutils, and IMO should really
be *in* distutils.

Thanks,

Sylvain

On Sun, Sep 4, 2016 at 4:02 PM, Steve Dower <steve.dower at python.org> wrote:

> "add it to setuptools first, and then add things to distutils where we
> feel they're sufficiently stable to not need the benefit of the faster
> setuptools update cycle"
>
> I nominate this as the official policy on API changes for distutils, with
> regular maintenance mode policies applying to anything else.
>
> Top-posted from my Windows Phone
> ------------------------------
> From: Nick Coghlan <ncoghlan at gmail.com>
> Sent: ‎9/‎4/‎2016 2:19
> To: Sylvain Corlay <sylvain.corlay at gmail.com>
> Cc: distutils sig <distutils-sig at python.org>
> Subject: Re: [Distutils] What is the official position on distutils?
>
> On 4 September 2016 at 06:44, Sylvain Corlay <sylvain.corlay at gmail.com>
> wrote:
> > Hi Brett,
> >
> > On Sat, Sep 3, 2016 at 8:05 PM, Brett Cannon <brett at python.org> wrote:
> >>
> >>
> >> If Jason is up for the responsibility that seems like a reasonable
> >> approach to take. It also helps test out features in setuptools first
> before
> >> upstreaming it.
> >>
> >
> > How do you see `has_flag` get into setuptools? By monkey-patching
> distutils'
> > ccompiler to have it aside of `has_function` when setuptools is imported?
> >
> > I find really weird the idea of adding this in a convoluted fashion
> instead
> > of allowing incremental improvement of distutils.
>
> The change to distutils would still be a plain patch to distutils, it
> would just be accepted at the API design level in setuptools first.
>
> The problem you're running into right now isn't a technical one - it's
> that there isn't anyone that currently feels like they have sufficient
> design authority over the distutils API to accept your proposal, hence
> Brett starting this thread to address that underlying recurring
> question, rather than the specifics of your change.
>
> Jason *definitely* has that design authority over setuptools though,
> and will be tasked with making any API additions available on older
> versions of Python via setuptools regardless of what policy we adopt
> for distutils maintenance, so if he's amenable to the idea, it makes
> sense to me to invert the order we ask those questions: add it to
> setuptools first, and then add things to distutils where we feel
> they're sufficiently stable to not need the benefit of the faster
> setuptools update cycle.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
> _______________________________________________
> Distutils-SIG maillist  -  Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20160904/9c42a6bb/attachment.html>


More information about the Distutils-SIG mailing list