Execute a Python script post install using distutils / setuptools
问题 I'm trying to add a post-install task to Python distutils as described in How to extend distutils with a simple post install script?. The task is supposed to execute a Python script in the installed lib directory . This script generates additional Python modules the installed package requires. My first attempt is as follows: from distutils.core import setup from distutils.command.install import install class post_install(install): def run(self): install.run(self) from subprocess import call