# HG changeset patch # User Christophe de Vienne # Date 1417092037 -3600 # Node ID 479190f019cc6c18f769a96628e87a1630a3850a # Parent 129af90b2364a6784e8bc513818dbd481125f533 [pkg] Make twisted recommended only It's not necessary when using wsgi or pyramid. Closes #4639508 diff -r 129af90b2364 -r 479190f019cc __pkginfo__.py --- a/__pkginfo__.py Thu Nov 27 12:11:29 2014 +0100 +++ b/__pkginfo__.py Thu Nov 27 13:40:37 2014 +0100 @@ -46,7 +46,6 @@ #gettext # for xgettext, msgcat, etc... # web dependencies 'lxml': '', - 'Twisted': '', # XXX graphviz # server dependencies 'logilab-database': '>= 1.12.1', @@ -63,6 +62,7 @@ 'vobject': '>= 0.6.0', # for ical view 'rdflib': None, # 'pyzmq': None, + 'Twisted': '', #'Products.FCKeditor':'', #'SimpleTAL':'>= 4.1.6', } diff -r 129af90b2364 -r 479190f019cc cwctl.py --- a/cwctl.py Thu Nov 27 12:11:29 2014 +0100 +++ b/cwctl.py Thu Nov 27 13:40:37 2014 +0100 @@ -524,6 +524,15 @@ def start_instance(self, appid): """start the instance's server""" + try: + import twisted # noqa + except ImportError: + msg = ( + "Twisted is required by the 'start' command\n" + "Either install it, or use one of the alternative commands:\n" + "- '{ctl} wsgi {appid}'\n" + "- '{ctl} pyramid {appid}' (requires the pyramid cube)\n") + raise ExecutionError(msg.format(ctl='cubicweb-ctl', appid=appid)) config = cwcfg.config_for(appid, debugmode=self['debug']) init_cmdline_log_threshold(config, self['loglevel']) if self['profile']: