opinkerfi / adagios

Adagios - Web Based Nagios Configuration
GNU Affero General Public License v3.0
330 stars 75 forks source link

USER_PREFS_PATH should respect --prefix #447

Open giner opened 10 years ago

giner commented 10 years ago

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.

palli commented 10 years ago

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

giner commented 10 years ago

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

palli commented 10 years ago

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.

giner commented 10 years ago

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

What about applying same here: