# HG changeset patch # User Sylvain Thénault # Date 1245855508 -7200 # Node ID a4acf959d07e74bdda68093133f947fb4863f30a # Parent fadb86b040a9f0239460f531367277ef39c24f96 cleanup diff -r fadb86b040a9 -r a4acf959d07e schema.py --- a/schema.py Wed Jun 24 16:58:12 2009 +0200 +++ b/schema.py Wed Jun 24 16:58:28 2009 +0200 @@ -32,8 +32,6 @@ schema.use_py_datetime() nodes.use_py_datetime() -_ = unicode - BASEGROUPS = ('managers', 'users', 'guests', 'owners') _LOGGER = getLogger('cubicweb.schemaloader') diff -r fadb86b040a9 -r a4acf959d07e skeleton/__pkginfo__.py.tmpl --- a/skeleton/__pkginfo__.py.tmpl Wed Jun 24 16:58:12 2009 +0200 +++ b/skeleton/__pkginfo__.py.tmpl Wed Jun 24 16:58:28 2009 +0200 @@ -17,16 +17,16 @@ short_desc = '%(shortdesc)s' long_desc = '''%(longdesc)s''' -from os import listdir as _listdir -from os.path import join, isdir - web = 'http://www.cubicweb.org/project/%%s' %% distname pyversions = ['2.4'] -#from cubicweb.devtools.pkginfo import get_distutils_datafiles -CUBES_DIR = join('share', 'cubicweb', 'cubes') -THIS_CUBE_DIR = join(CUBES_DIR, '%(cubename)s') + +from os import listdir as _listdir +from os.path import join, isdir, exists, dirname +from glob import glob + +THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname) def listdir(dirpath): return [join(dirpath, fname) for fname in _listdir(dirpath) @@ -34,12 +34,11 @@ and not fname.endswith('~') and not isdir(join(dirpath, fname))] -from glob import glob try: data_files = [ # common files [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']], - ] + ] # check for possible extended cube layout for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'): if isdir(dirname): @@ -47,8 +46,9 @@ # Note: here, you'll need to add subdirectories if you want # them to be included in the debian package except OSError: + if exists(dirname(__file__)): + raise # we are in an installed directory - pass cube_eid = None # <=== FIXME if you need direct bug-subscription