bin/cubicweb-ctl.bat
author Philippe Pepiot <philippe.pepiot@logilab.fr>
Thu, 19 Jan 2017 15:27:39 +0100
changeset 11899 bf6106b91633
parent 5499 2a5cc708c2a0
permissions -rw-r--r--
[schema] load schema from modules names instead of directories Introspect cubicweb, cubes and apphome using pkgutil to generate the full list of modules names for loading the schema. Keep historical behavior and check if source .py file exists if a module is found using python bytecode file (.pyc and .pyo) Loading schema from apphome require apphome to be present in sys.path and that "schema" module resolve to a file located in apphome. Update migraction tests to explicitely update sys.path when loading schema from different apps, use a contextmanager for this so it's more readable. Require updated logilab-common and yams
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3116
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     1
@echo off
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     2
rem = """-*-Python-*- script
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     3
rem -------------------- DOS section --------------------
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     4
rem You could set PYTHONPATH or TK environment variables here
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     5
python -x "%~f0" %*
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     6
goto exit
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     7
 
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     8
"""
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
     9
# -------------------- Python section --------------------
4096
871ff503c23e update sys.path at cubicweb startup
Administrator <>
parents: 3116
diff changeset
    10
import sys
5499
2a5cc708c2a0 fixed bug of non-normalized path under Windows, that broke the reload mechanism
egazoni
parents: 4096
diff changeset
    11
from os.path import join, dirname, normpath
2a5cc708c2a0 fixed bug of non-normalized path under Windows, that broke the reload mechanism
egazoni
parents: 4096
diff changeset
    12
sys.path.insert(0, normpath(join(dirname(__file__), '..', '..')))
3116
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    13
from cubicweb.cwctl import run
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    14
run(sys.argv[1:])
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    15
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    16
DosExitLabel = """
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    17
:exit
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    18
rem """
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    19
8bf500eb01d6 two convenience files
Aurélien Campéas
parents:
diff changeset
    20