Skip to content
Snippets Groups Projects
Commit 1663cbd2a6d9 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

packaging fix: the views subpackage was missing. Backport new style data_files...

packaging fix: the views subpackage was missing. Backport new style data_files construction to avoid such error in the future
parent 4e7ee3b4a15b
No related branches found
No related tags found
No related merge requests found
...@@ -8,8 +8,6 @@ ...@@ -8,8 +8,6 @@
version = '.'.join(str(num) for num in numversion) version = '.'.join(str(num) for num in numversion)
license = 'LGPL' license = 'LGPL'
copyright = '''Copyright (c) 2003-2010 LOGILAB S.A. (Paris, FRANCE).
http://www.logilab.fr/ -- mailto:contact@logilab.fr'''
author = "Logilab" author = "Logilab"
author_email = "contact@logilab.fr" author_email = "contact@logilab.fr"
...@@ -74,6 +72,9 @@ ...@@ -74,6 +72,9 @@
# package ### # package ###
from os import listdir from os import listdir as _listdir
from os.path import join from os.path import join, isdir, exists
from glob import glob
THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
...@@ -79,17 +80,15 @@ ...@@ -79,17 +80,15 @@
CUBES_DIR = join('share', 'cubicweb', 'cubes') def listdir(dirpath):
try: return [join(dirpath, fname) for fname in _listdir(dirpath)
data_files = [ if fname[0] != '.' and not fname.endswith('.pyc')
[join(CUBES_DIR, 'blog'), and not fname.endswith('~')
[fname for fname in listdir('.') and not isdir(join(dirpath, fname))]
if fname.endswith('.py') and fname != 'setup.py']],
[join(CUBES_DIR, 'blog', 'data'), data_files = [
[join('data', fname) for fname in listdir('data')]], # common files
[join(CUBES_DIR, 'blog', 'i18n'), [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
[join('i18n', fname) for fname in listdir('i18n')]], ]
[join(CUBES_DIR, 'blog', 'migration'), # check for possible extended cube layout
[join('migration', fname) for fname in listdir('migration')]], for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
] if isdir(dname):
except OSError: data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
# we are in an installed directory
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment