3

I create a python package. The configuration should be placed in /etc/myapp if installed globally or in ~/.myapp if installed for user only (pip install myapp --user).

I can do the first point with this in the setup.py file: data_files = [("/etc/myapp", ['application.properties'])

But how can I place this file in ~/.myapp if installed for user only?

Floréal C
  • 98
  • 1
  • 7
  • 2
    Don't install files to absolute targets, this won't work with `pip` anyway (unless you explicitly avoid building wheels on`pip install` via `--no-binary`). Check out [this answer](https://stackoverflow.com/a/47465374/2650249) for details. – hoefling Sep 25 '18 at 21:24

0 Answers0