goa/goactl.py
branchtls-sprint
changeset 1132 96752791c2b6
parent 812 9ec81a0dc96d
child 1133 8a409ea0c9ec
equal deleted inserted replaced
1131:544609e83317 1132:96752791c2b6
     4 :copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     4 :copyright: 2008-2009 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     5 :contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
     6 """
     6 """
     7 __docformat__ = "restructuredtext en"
     7 __docformat__ = "restructuredtext en"
     8 
     8 
     9 from os.path import exists, join, split, dirname, basename, normpath, abspath
     9 from os.path import exists, join, split, basename, normpath, abspath
       
    10 
       
    11 from logilab.common.clcommands import register_commands
    10 
    12 
    11 from cubicweb import BadCommandUsage
    13 from cubicweb import BadCommandUsage
    12 from cubicweb import CW_SOFTWARE_ROOT
    14 from cubicweb import CW_SOFTWARE_ROOT
    13 from cubicweb.toolsutils import (Command, register_commands, copy_skeleton,
    15 from cubicweb.toolsutils import (Command, register_commands, copy_skeleton,
    14                                  create_dir, create_symlink, create_copy)
    16                                  create_dir, create_symlink)
    15 from cubicweb.cwconfig import CubicWebConfiguration
    17 from cubicweb.cwconfig import CubicWebConfiguration
    16 
    18 
    17 from logilab import common as lgc
    19 from logilab import common as lgc
    18 from logilab.common.textutils import get_csv
       
    19 from logilab import constraint as lgcstr
    20 from logilab import constraint as lgcstr
    20 from logilab import mtconverter as lgmtc
    21 from logilab import mtconverter as lgmtc
    21 import rql, yams, yapps, simplejson, dateutil, vobject, docutils, roman
    22 import rql, yams, yapps, simplejson, dateutil, vobject, docutils, roman
    22 
    23 
    23 SLINK_DIRECTORIES = (
    24 SLINK_DIRECTORIES = (
   211                            join(appldir, 'cubicweb', subfpath))
   212                            join(appldir, 'cubicweb', subfpath))
   212         # link every supported components
   213         # link every supported components
   213         packagesdir = join(appldir, 'cubes')
   214         packagesdir = join(appldir, 'cubes')
   214         create_init_file(join(appldir, 'cubes'), 'cubes')
   215         create_init_file(join(appldir, 'cubes'), 'cubes')
   215         cubesdir = CubicWebConfiguration.cubes_dir()
   216         cubesdir = CubicWebConfiguration.cubes_dir()
   216         for include in ('addressbook','basket', 'blog','classfolders',
   217         for include in ('addressbook', 'basket', 'blog','folder',
   217                         'classtags', 'comment', 'file', 'link',
   218                         'tag', 'comment', 'file', 'link',
   218                         'mailinglist', 'person', 'task', 'zone',
   219                         'mailinglist', 'person', 'task', 'zone',
   219                         ):
   220                         ):
   220             create_symlink(join(cubesdir, include), join(packagesdir, include))
   221             create_symlink(join(cubesdir, include), join(packagesdir, include))
   221         # generate sample config
   222         # generate sample config
   222         from cubicweb.goa.goaconfig import GAEConfiguration
   223         from cubicweb.goa.goaconfig import GAEConfiguration