Suppose that I am building a Python package with the following folder tree:
main
|-- setup.py
|-- the_package
|--globar_vars.py
|--the_main_script.py
When the user performs anyway to install it, like:
sudo python setup.py install
python setup.py install --user
python setup.py install --prefix=/usr/local
Or well, using PIP:
pip install 'SomeProject'
I want that the folder where the package was installed be saved on the global_vars.py, in any variable, Eg:
globarl_vars.py
#!/usr/bin/env python3
user_installed_pkg = '/some/path/where/the/package/was/installed'
There is someway to get it? Thanks in advance.