[Distutils] Setup.py as a Class, not a Procedure

Jean-Paul Calderone exarkun at divmod.com
Sat Jul 25 02:55:11 CEST 2009


On Fri, 24 Jul 2009 20:42:29 -0400, David Lyon <david.lyon at preisshare.net> wrote:
>Tarek,
>
>Recently I suggested having setup.py implemented as
>a class and not a procedure.
>
>I posted some notes on http://wiki.python.org/moin/Distutils/Proposals
>
>Do you have any comment?
>

David,

I think you should flesh out your proposal a bit more:

  1) List the drawbacks of the current API.  I'm sure we can all think of a
     few, but collecting them in a persistent location will make it easier
     to think about the replacement.

  2) Write up how switching to an "Object Oriented" API will help things.
     This can probably mostly be responses to the list of stuff from #1, but
     it's also useful to talk about how this approach is better than fixing
     the problems without trying for such a major overhaul.

  3) Lose the stuff about setup.cfg - where configuration data goes can be
     the same regardless of what the Python API looks like.  This might be
     a good change, but it doesn't seem related to this proposal.

  4) pre_setup and post_setup don't seem to need to exist.  If the main
     setup entry-point is a class with some methods, then subclasses can
     override these methods to do things before and after them; special
     support isn't required.

Also, I think you were having trouble figuring out how to make a new sub-
page on the wiki.  If you just visit an URL like

  http://wiki.python.org/moin/Distutils/Proposals/ObjectOriented

Then you'll be presented with a link to create that page.  Then you can link
to it from the proposals page.

Jean-Paul


More information about the Distutils-SIG mailing list