

"""Post-installation for installation mode."""Īnd insert cmdclass argument to setup() function in setup.py: setup( # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION """Post-installation for development mode."""

You will make a few additions to setup.py and there is no need for an extra file.Īlso you need to consider two different post-installations one for development/editable mode and the other one for install mode.Īdd these two classes that includes your post-install script to setup.py: from setuptools import setupįrom import developįrom import install It will not work when installing from a binary wheel (.

Note: The solution below only works when installing a source distribution zip or tarball, or installing in editable mode from a source tree.
