[Distutils] [setuptools] running a post_install script
Phillip J. Eby
pje at telecommunity.com
Thu Aug 24 22:44:27 CEST 2006
At 06:44 PM 8/24/2006 +0100, Jon Peirce wrote:
>I've just been discovering the beauties of setuptools - for someone like
>me, developing a package with many dependencies, it could be just the
>tonic! And very easy to get going too - thnks!
>One question though - my package carries a post-install script to create
>a few shortcuts on windows systems. Creating an egg and then
>easy_installing it copies a setuptools version of the script to the
>scripts folder but it doesn't run at the end of install (or maybe it
>tries to and fails in some hidden way).
easy_install doesn't support post-install scripts, currently, as it's
designed for installation of libraries rather than applications.
It's possible that some future version of easy_install could support a
mechanism for various kinds of post-install hooks, in order to allow e.g.
shortcut registration, registry entries, and the like. The idea would be
that a package would include metadata that describes the registration info
needed, rather than including code to actually do the registration. (The
idea here being that we're not opening up for arbitrary code to run during
But at this point, such a feature is a rather long way off. So for now,
it's best to just instruct users how to run your postinstall script (which
ideally should be given a name that's unique to your package, e.g.
'foo-postinstall' if your package is named foo).
More information about the Distutils-SIG