'Add custom action to setup.py

I have the project with such structure:

Project/
    Project/
        __init__.py
        config.py
    setup.py
    .gitignore

config.py contains two variables (LOGIN, PASS) and is added to .gitignore.

I would like to add custom action to setup.py then run python setup.py install than triggered creating config.py with some inputs("Please write your login/pass") prior to installation of package.

How to do it right?



Sources

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

Source: Stack Overflow

Solution Source