Commit 80ee71fb authored by Aurelien Campeas's avatar Aurelien Campeas
Browse files

[skeleton/dependencies] fix typo & new cube generation from template

--HG--
branch : stable
parent 0de53140bd29
......@@ -50,7 +50,7 @@ Depends: python-psycopg2, postgresql-client
Description: postgres support for the CubicWeb framework
CubicWeb is a semantic web application framework.
.
This virtual package provides dependancies to use postgres for the
This virtual package provides dependencies to use postgres for the
cubicweb repository.
Package: cubicweb-mysql-support
......@@ -60,7 +60,7 @@ Depends: python-mysqldb, mysql-client
Description: mysql support for the CubicWeb framework
CubicWeb is a semantic web application framework.
.
This virtual package provides dependancies to use mysql for the
This virtual package provides dependencies to use mysql for the
cubicweb repository.
......
......@@ -515,19 +515,14 @@ class NewCubeCommand(Command):
longdesc = shortdesc = raw_input('Enter a short description for your cube: ')
if verbose:
longdesc = raw_input('Enter a long description (leave empty to reuse the short one): ')
dependencies = {}
if verbose:
includes = self._ask_for_dependancies()
if len(includes) == 1:
dependancies = '%r,' % includes[0]
else:
dependancies = ', '.join(repr(cube) for cube in includes)
else:
dependancies = ''
dependencies = self._ask_for_dependencies()
context = {'cubename' : cubename,
'distname' : distname,
'shortdesc' : shortdesc,
'longdesc' : longdesc or shortdesc,
'dependancies' : dependancies,
'dependencies' : dict((dep, None) for dep in dependencies),
'version' : cubicwebversion,
'year' : str(datetime.now().year),
'author': self['author'],
......@@ -536,7 +531,7 @@ class NewCubeCommand(Command):
}
copy_skeleton(skeldir, cubedir, context)
def _ask_for_dependancies(self):
def _ask_for_dependencies(self):
from logilab.common.shellutils import ASK
from logilab.common.textutils import splitstrip
includes = []
......@@ -546,7 +541,7 @@ class NewCubeCommand(Command):
if answer == 'y':
includes.append(stdtype)
if answer == 'type':
includes = splitstrip(raw_input('type dependancies: '))
includes = splitstrip(raw_input('type dependencies: '))
break
elif answer == 'skip':
break
......
......@@ -195,7 +195,7 @@ class NewGoogleAppCommand(Command):
# goa instance'skeleton
copy_skeleton(join(CW_SOFTWARE_ROOT, 'goa', 'skel'),
appldir, context, askconfirm=True)
# cubicweb core dependancies
# cubicweb core dependencies
for directory, subdirectory in slink_directories():
subdirectory = join(appldir, subdirectory)
if not exists(split(subdirectory)[0]):
......
......@@ -43,8 +43,11 @@ for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n'
# Note: here, you'll need to add subdirectories if you want
# them to be included in the debian package
__depends_cubes__ = {}
__depends__ = {'cubicweb': '>= 3.6.0'}
__use__ = (%(dependancies)s)
# a dict; you might want to provide a version specification
# of the form '>= x.y.z'
__depends_cubes__ = %(dependencies)s
__depends__ = {'cubicweb': '>= 3.7.0'}
# obsolete (will be gone in cw 3.8.0)
__use__ = tuple(__depends_cubes__)
__recommend__ = ()
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