Post install script after installing a wheel

Do not mix package installation and system deployment

Installation of Python packages (using any sort of packaging tools or formats) shall be focused on making that package usable from Python code.

Deployment, what might include database modifications etc. is definitely out of scope and shall be handled by other tools like fab, salt-stack etc.

The fact, that something seems fairly trivial does not mean, one shall do it.

The risk is, you will make your package installation difficult to reuse, as it will be spoiled by others things, which are not related to pure package installation.

The option to hook into installation process and modify environment is by some people even considered flaw in design, causing big mess in Python packaging situation – see Armin Roacher in Python Packaging: Hate, Hate, Hate Everywhere, chapter “PTH: The failed Design that enabled it all”

Leave a Comment