[Distutils] Patch to bdist_rpm

Greg Ward gward@python.net
Sun, 4 Jun 2000 10:56:10 -0400


On 04 June 2000, I said:
> Considerations:
> 
>   * you might prefer to write your {pre,post}-{install,uninstall}
>     scripts in Python rather than shell, especially if you'll use
>     the same scripts on non-Unix platforms
> 
>   * you might have the same scripts for all platforms, or you might have 
>     distinct Unix/Windows/Mac OS scripts, or you might even have
>     distinct Debian Linux/Red Hat Linux/Free BSD/NetBSD/Solaris/IRIX/...
>     scripts
> 
>   * very similar to the above: you might have the same scripts for every
>     type of built distribution, or you might have different ones for
>     RPM, Debian packages, BSD packages, Thomas' homebrew Windows
>     installer, Wise installers, etc.
> 
>   * you might have very simple, one-command scripts (especially if
>     they are shell code), or complex scripts that need to go in a file
> 
>   * very rarely would you specify all this on the "bdist_rpm" command
>     line -- this is the sort of stuff that the per-distribution config
>     file (setup.cfg) is just made for

OK, I think I have an answer: for "bdist_rpm", just supply little
snippets of shell code.  If those snippets are "python
/tmp/foo_postinst.py", that's fine.  (I'm just guessing that
post-installation scripts would go to /tmp, and I have no idea how
pre-installation scripts would be handled.)

IOW, I'm inclined to push the complexity onto module developers,
packagers, and their config files.  I simply don't understand the
situation sufficiently to construct an all-singing, all-dancing,
pre/post install/uninstall bureaucracy for the Distutils.

        Greg
-- 
Greg Ward - just another /P(erl|ython)/ hacker          gward@python.net
http://starship.python.net/~gward/
"I know a lot about art, but I don't know what I like!"