[cwconfig] Do not override user-defined CW_MODE in virtualenv setup
And thus consider `_forced_mode` first.
Related to #14789440.
--- a/cubicweb/cwconfig.py Wed Jul 06 20:28:51 2016 +0200
+++ b/cubicweb/cwconfig.py Tue Aug 16 14:16:10 2016 +0200
@@ -357,8 +357,8 @@
quick_start = False
if 'VIRTUAL_ENV' in os.environ:
+ mode = _forced_mode or 'user'
_CUBES_DIR = join(_INSTALL_PREFIX, 'share', 'cubicweb', 'cubes')
- mode = 'user'
elif CWDEV and _forced_mode != 'system':
mode = 'user'
_CUBES_DIR = join(CW_SOFTWARE_ROOT, '../../cubes')