'Post-install script with Python Poetry

Post-install script with Python setuptools

Exactly this question, but with Poetry and no Setuptools.

I want to run

print('Installation finished, doing other things...')

when my package is installed. With Setuptools you could just modify setup.py, but in Poetry there specifically is no setup.py.

What I actually want to do is generate a default .mypackage_config file and place it somewhere useful. I don't see how to do this without arbitrary code, but Poetry does not allow arbitrary code for installation. Is there any way to do this?



Solution 1:[1]

at my current project we decided to create a bootstrap script, maybe it's the best way to go

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 rodfersou