[Distutils] PEP 426: proposed metadata caching convention

Vinay Sajip vinay_sajip at yahoo.co.uk
Wed Feb 27 11:52:50 CET 2013


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. If we want to move
things forward in packaging, surely we have to make migration easier? IMO this
was one of the things that distutils2/packaging also did not address
sufficiently.

Just to clarify: when I say "hooks", what I mean is "setuptools-style entry
points that the installer looks for, which are used to customise the installation
process". I believe it is possible to provide limited extensibility using hooks
without it leading to the complete ad-hocery that setup.py entails.

Regards,

Vinay Sajip



More information about the Distutils-SIG mailing list