# HG changeset patch # User Nicolas Chauvat # Date 1248354958 -7200 # Node ID 888d698af3f985942bf9bc69d7c2a478a63f5a1d # Parent 440cb4ea7e5c6100e4f6c9328a48344c5bb75a50 #344747: add env var CW_MODE diff -r 440cb4ea7e5c -r 888d698af3f9 cwconfig.py --- a/cwconfig.py Thu Jul 23 14:51:40 2009 +0200 +++ b/cwconfig.py Thu Jul 23 15:15:58 2009 +0200 @@ -149,7 +149,7 @@ CUBES_DIR = '%(APYCOT_ROOT)s/local/share/cubicweb/cubes/' % os.environ # create __init__ file file(join(CUBES_DIR, '__init__.py'), 'w').close() - elif exists(join(CW_SOFTWARE_ROOT, '.hg')): + elif exists(join(CW_SOFTWARE_ROOT, '.hg')) or os.environ.get('CW_MODE') == 'user': mode = 'dev' CUBES_DIR = abspath(normpath(join(CW_SOFTWARE_ROOT, '../cubes'))) else: diff -r 440cb4ea7e5c -r 888d698af3f9 doc/book/en/admin/setup.rst --- a/doc/book/en/admin/setup.rst Thu Jul 23 14:51:40 2009 +0200 +++ b/doc/book/en/admin/setup.rst Thu Jul 23 15:15:58 2009 +0200 @@ -106,15 +106,16 @@ Add the following lines to either `.bashrc` or `.bash_profile` to configure your development environment :: - export PYTHONPATH=/full/path/to/cubicweb-forest + export PYTHONPATH=/full/path/to/cubicweb-forest -If you installed the debian packages, no configuration is required. -Your new cubes will be placed in `/usr/share/cubicweb/cubes` and -your applications will be placed in `/etc/cubicweb.d`. +If you installed *CubicWeb* with packages, no configuration is required and your +new cubes will be placed in `/usr/share/cubicweb/cubes` and your applications +will be placed in `/etc/cubicweb.d`. -To use others directories then you will have to configure the -following environment variables as follows:: +You may run a system-wide install of *CubicWeb* in "user mode" and use it for +development by setting the following environment variable:: + export CW_MODE=user export CW_CUBES_PATH=~/lib/cubes export CW_INSTANCES_DIR=~/etc/cubicweb.d/ export CW_INSTANCES_DATA_DIR=$CW_INSTANCES_DIR