opkfreaks.blogg.se

Python setuptools install
Python setuptools install









python setuptools install

"""Pre-installation for development mode."""Ĭheck_call("apt-get install this-package".split()) You can even call shell commands during installation, like in this example which does pre-installation preparation: from setuptools import setup """Post-installation for installation mode."""Īnd insert cmdclass argument to setup() function in setup.py: setup(

python setuptools install

# 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.











Python setuptools install