[Distutils] PEP 426: proposed metadata caching convention

Glyph glyph at twistedmatrix.com
Wed Feb 27 19:47:31 CET 2013


On Feb 27, 2013, at 2:52 AM, Vinay Sajip <vinay_sajip at yahoo.co.uk> wrote:

> Nick Coghlan <ncoghlan <at> gmail.com> writes:
> 
>> I'm not a fan of post-install hooks - that way lies setup.py. If
>> people want to run arbitrary code at install time, they can publish a
>> platform specific installer.
>> 
>> *Maybe* we can go down that path in the Python 3.5 timeframe, but for now, no.
> 
> I'm concerned that this might affect adoption: there are a lot of projects that
> have non-trivial custom code in setup.py - often doing mundane stuff like copying
> files around before the actual setup() call. Having hooks will enable easier
> migration for such projects (which include, for example, Twisted, Cython, NumPy).
> I don't believe it's realistic to expect them all to create platform-specific
> installers; they'll just carry on using setuptools/distribute.

Quite so.

Post-install hooks are a requirement for Twisted and for many projects which depend on Twisted.  The hook is always the same on every platform, so it's not a platform-specific installer issue.

Frankly, a big appeal of some next-generation package distribution system is the introduction of a proper set of events we can hook into, instead of assuming that by some accident of timing we can work out when the software is being "installed" and call some random function from the bottom of setup.py with a bunch of state scooped out of distutils' internals.  The current situation is a total mess.

-glyph

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/distutils-sig/attachments/20130227/8067825f/attachment-0001.html>


More information about the Distutils-SIG mailing list