bin/cubicweb-ctl.bat
author Denis Laxalde <denis.laxalde@logilab.fr>
Thu, 21 Mar 2019 14:33:54 +0100
changeset 12530 9d88e1177c35
parent 5499 2a5cc708c2a0
permissions -rw-r--r--
Remove Twisted web server Twisted web server is not used anymore and has been superseded by pyramid many years ago. Furthermore, our usage is not compatible with Python 3. So we drop the "etwist" sub-package. As a consequence, "all-in-one" configuration type gets dropped as it was Twisted-specific. We resurrect it in cubicweb/pyramid/config.py by only keeping options used by the "pyramid". Similarly, we introduce a AllInOneCreateHandler in cubicweb/pyramid/pyramidctl.py that is basically the one that lived in cubicweb/etwist/twctl.py and is used to create the "all-in-one" instance. Added a TODO here about "pyramid.ini" that could be generated at the end of bootstrap() method. In cubicweb/devtools/httptest.py, CubicWebServerTC is now equivalent to CubicWebWsgiTC and the latter is dropped.
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