Hello manatlan,
I package an app using setuptools.
The app is installed in the user environment:
$ python3 -m pip install --user mypkg.tar.gz
I can run my main script located in
~/.local/bin and the package itself is located in ~/.local/lib/python3.X/site-packages/MyPkg/.
When app is started (initialized), 'config.json' is called in my home directory (i.e. ~/config.json).
But after start, 'config.json' is called in the .local directory (i.e. ~/.local/bin/config.json).
Change seems to appear in the serve() method of Guy() class:
os.chdir( os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0]))) )
Am I doing something wrong?
Thank you
Hello manatlan, I package an app using setuptools. The app is installed in the user environment:
I can run my main script located in ~/.local/bin and the package itself is located in ~/.local/lib/python3.X/site-packages/MyPkg/. When app is started (initialized), 'config.json' is called in my home directory (i.e. ~/config.json). But after start, 'config.json' is called in the .local directory (i.e. ~/.local/bin/config.json). Change seems to appear in the serve() method of Guy() class:
os.chdir( os.path.dirname(os.path.abspath(os.path.realpath(sys.argv[0]))) )
Am I doing something wrong? Thank you