Commit 17816567 authored by Denis Laxalde's avatar Denis Laxalde
Browse files

Reorganize source tree to have a "cubicweb" top-level package


mkdir cubicweb
hg mv *.py -X cubicweb
hg mv dataimport devtools entities etwist ext hooks i18n misc schemas server skeleton sobjects test web wsgi cubicweb

Other changes:

* adjust path to cubicweb-ctl in devtools tests
* update to avoid importing __pkginfo__ (exec it instead),
  replace os.path.walk by os.walk and prepend `modname` here and there
* update tox.ini to account for new test locations
* update doc/ so that it still finds and CWDIR in
parent 058bb3dc685f
......@@ -19,33 +19,33 @@ recursive-include doc/dev .txt *.rst
recursive-include doc/images *.png *.svg
include doc/
recursive-include misc *.py *.png *.display
recursive-include cubicweb/misc *.py *.png *.display
include web/views/*.pt
recursive-include web/data external_resources *.js *.css *.py *.png *.gif *.ico *.ttf *.svg *.woff *.eot
recursive-include web/wdoc *.rst *.png *.xml ChangeLog*
recursive-include devtools/data *.js *.css *.sh
include cubicweb/web/views/*.pt
recursive-include cubicweb/web/data external_resources *.js *.css *.py *.png *.gif *.ico *.ttf *.svg *.woff *.eot
recursive-include cubicweb/web/wdoc *.rst *.png *.xml ChangeLog*
recursive-include cubicweb/devtools/data *.js *.css *.sh
recursive-include i18n *.pot *.po
recursive-include schemas *.py *.sql
recursive-include cubicweb/i18n *.pot *.po
recursive-include cubicweb/schemas *.py *.sql
recursive-include test/data bootstrap_cubes *.py *.sql
recursive-include entities/test/data bootstrap_cubes *.py
recursive-include sobjects/test/data bootstrap_cubes *.py
recursive-include hooks/test/data bootstrap_cubes *.py
recursive-include server/test/data bootstrap_cubes *.py source* * *.ldif
recursive-include devtools/test/data bootstrap_cubes *.py *.txt *.js *.po.ref
recursive-include web/test/data bootstrap_cubes pouet.css *.py
recursive-include etwist/test/data *.py
recursive-include cubicweb/test/data bootstrap_cubes *.py *.sql
recursive-include cubicweb/entities/test/data bootstrap_cubes *.py
recursive-include cubicweb/sobjects/test/data bootstrap_cubes *.py
recursive-include cubicweb/hooks/test/data bootstrap_cubes *.py
recursive-include cubicweb/server/test/data bootstrap_cubes *.py source* * *.ldif
recursive-include cubicweb/devtools/test/data bootstrap_cubes *.py *.txt *.js *.po.ref
recursive-include cubicweb/web/test/data bootstrap_cubes pouet.css *.py
recursive-include cubicweb/etwist/test/data *.py
recursive-include web/test/jstests *.js *.html *.css *.json
recursive-include web/test/windmill *.py
recursive-include cubicweb/web/test/jstests *.js *.html *.css *.json
recursive-include cubicweb/web/test/windmill *.py
recursive-include skeleton *.py *.css *.js *.po compat *.in *.tmpl rules
recursive-include cubicweb/skeleton *.py *.css *.js *.po compat *.in *.tmpl rules
prune doc/book/en/.static
prune doc/book/fr/.static
prune doc/html/_sources/
prune misc/cwfs
prune cubicweb/misc/cwfs
prune doc/js_api
global-exclude *.pyc
......@@ -84,12 +84,12 @@ include_dirs = [join('test', 'data'),
'schemas', 'skeleton']
_server_migration_dir = join('misc', 'migration')
_data_dir = join('web', 'data')
_wdoc_dir = join('web', 'wdoc')
_server_migration_dir = join(modname, 'misc', 'migration')
_data_dir = join(modname, 'web', 'data')
_wdoc_dir = join(modname, 'web', 'wdoc')
_wdocimages_dir = join(_wdoc_dir, 'images')
_views_dir = join('web', 'views')
_i18n_dir = 'i18n'
_views_dir = join(modname, 'web', 'views')
_i18n_dir = join(modname, 'i18n')
_pyversion = '.'.join(str(num) for num in sys.version_info[0:2])
if '--home' in sys.argv:
......@@ -108,7 +108,7 @@ try:
data_files = [
# server data
[join('share', 'cubicweb', 'schemas'),
glob.glob(join('schemas', '*.sql'))],
glob.glob(join(modname, 'schemas', '*.sql'))],
[join('share', 'cubicweb', 'migration'),
[join(_server_migration_dir, filename)
for filename in listdir(_server_migration_dir)]],
......@@ -106,9 +106,9 @@ Development Mode
If :file:`.hg` directory is found into the cubicweb package, there are specific resource rules.
`<CW_SOFTWARE_ROOT>` is the mercurial checkout of cubicweb:
`<CW_SOFTWARE_ROOT>` is the source checkout's ``cubicweb`` directory:
* main cubes directory is `<CW_SOFTWARE_ROOT>/../cubes`. You can specify
* main cubes directory is `<CW_SOFTWARE_ROOT>/../../cubes`. You can specify
another one with :envvar:`CW_INSTANCES_DIR` environment variable or simply
add some other directories by using :envvar:`CW_CUBES_PATH`
......@@ -335,7 +335,7 @@ class CubicWebNoAppConfiguration(ConfigurationMixIn):
if (CWDEV and _forced_mode != 'system'):
mode = 'user'
_CUBES_DIR = join(CW_SOFTWARE_ROOT, '../cubes')
_CUBES_DIR = join(CW_SOFTWARE_ROOT, '../../cubes')
mode = _forced_mode or 'system'
_CUBES_DIR = join(_INSTALL_PREFIX, 'share', 'cubicweb', 'cubes')
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment