adagios icon indicating copy to clipboard operation
adagios copied to clipboard

USER_PREFS_PATH should respect --prefix

Open giner opened this issue 10 years ago • 4 comments

I have installed Adagios 1.6.1 with --prefix=/opt/adagios however USER_PREFS_PATH points to /var/lib/adagios/userdata. It should be in PREFIX/lib/adagios/userdata instead or being configurable.

giner avatar Oct 27 '14 12:10 giner

Interesting... What is --prefix in this case... an argument to pip or setup.py ?

palli avatar Oct 27 '14 19:10 palli

I mean --install-option="--prefix=..." for pip where --prefix option is passed to setup.py.

giner avatar Oct 27 '14 19:10 giner

Ok thanks for reporting this.

As you have noticed before, pip support in adagios is a mess, i am not even sure if pip can properly accommodate for full-fledged web applications (as opposed to just installing python libraries + occasional binary which it is great for).

Currently i am aware of adagios.conf and userdata paths being a problem in this regard.

Not sure what the best solution would be here, but it seems like we either need to let pip dynamically edit settings.py after installing (which seems dirty) or find a way to let apache configuration overwrite paths like path to adagios config file.

palli avatar Oct 27 '14 20:10 palli

I'm not sure what way is common in python world but in Unix the following approach is often followed:

  • use ~/.myapp/myapp.conf if it exists
  • and use /etc/myapp/myapp.conf if not

What about applying same here:

  • use /etc/adagios/adagios.conf if it exists
  • and use PREFIX/etc/adagios.conf if not And the same for user data.

giner avatar Oct 27 '14 20:10 giner