I need to run a simple script after the modules and programs have been installed. I\'m having a little trouble finding straight-forward documentation on how to do this. It l
I couldn't make Joe Wreschnigs answer work and tweaked his answer analogous to the extending distutils documentation. I came up with this code which works fine on my machine.
from distutils import core
from distutils.command.install import install
...
class my_install(install):
def run(self):
install.run(self)
# Custom stuff here
# distutils.command.install actually has some nice helper methods
# and interfaces. I strongly suggest reading the docstrings.
...
distutils.core.setup(..., cmdclass={'install': my_install})
Note: I didn't edit the answer of Joe since I am uncertain why his answer wasn't working on my machine.