The problem is the automatic config which assumes that the app is in the same directory as the parent of the mara-app package: https://github.com/mara/mara-app/blob/master/mara_app/views.py#L21. This isn't true in case where the mara packages were installed directly into the venv.
I need to install the package into the venv, because I want to have one venv/directory per requirements.txt.freeze file and one directory per commit of the main app. The final tree looks like this:
venv/requirements.txt.freeze-hash1/... # python venv
venv/requirements.txt.freeze-hash2/...
...
commit/commit-id1/... # the whole checked out commit
commit/commit-id1/.venv # symlink to venv/requirements.txt.freeze-hash1
...
current # symlink to commit/commit-id1/
The app is then started by calling ./current/.venv/bin/python ...
If I use the supplied makefile, which installs the mara package into the package directory instead of the venv, pip installs/"links" these packages into the venv with absolute path, so switching current to commit/commit-id2/ still loads mara packages from commit/commit-id1/.
The problem is the automatic config which assumes that the app is in the same directory as the parent of the mara-app package: https://github.com/mara/mara-app/blob/master/mara_app/views.py#L21. This isn't true in case where the mara packages were installed directly into the venv.
I need to install the package into the venv, because I want to have one venv/directory per
requirements.txt.freeze
file and one directory per commit of the main app. The final tree looks like this:The app is then started by calling
./current/.venv/bin/python ...
If I use the supplied makefile, which installs the mara package into the package directory instead of the venv, pip installs/"links" these packages into the venv with absolute path, so switching
current
tocommit/commit-id2/
still loads mara packages fromcommit/commit-id1/
.