[devtools] Update skeleton and newcube command to cube as package layout
authorDenis Laxalde <denis.laxalde@logilab.fr>
Thu, 19 May 2016 14:27:28 +0200
changeset 11454 7770559e3945
parent 11453 3522d2a3389e
child 11455 d686c4e8cdb2
[devtools] Update skeleton and newcube command to cube as package layout Related to #13001466.
cubicweb/devtools/devctl.py
cubicweb/devtools/test/unittest_devctl.py
cubicweb/skeleton/__init__.py.tmpl
cubicweb/skeleton/__pkginfo__.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/__init__.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/__pkginfo__.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/data/cubes.CUBENAME.css
cubicweb/skeleton/cubicweb_CUBENAME/data/cubes.CUBENAME.js
cubicweb/skeleton/cubicweb_CUBENAME/entities.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/hooks.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/i18n/en.po
cubicweb/skeleton/cubicweb_CUBENAME/i18n/es.po
cubicweb/skeleton/cubicweb_CUBENAME/i18n/fr.po
cubicweb/skeleton/cubicweb_CUBENAME/migration/postcreate.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/migration/precreate.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/schema.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/sobjects.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/uiprops.py.tmpl
cubicweb/skeleton/cubicweb_CUBENAME/views.py.tmpl
cubicweb/skeleton/data/cubes.CUBENAME.css
cubicweb/skeleton/data/cubes.CUBENAME.js
cubicweb/skeleton/entities.py.tmpl
cubicweb/skeleton/hooks.py.tmpl
cubicweb/skeleton/i18n/en.po
cubicweb/skeleton/i18n/es.po
cubicweb/skeleton/i18n/fr.po
cubicweb/skeleton/migration/postcreate.py.tmpl
cubicweb/skeleton/migration/precreate.py.tmpl
cubicweb/skeleton/schema.py.tmpl
cubicweb/skeleton/sobjects.py.tmpl
cubicweb/skeleton/tox.ini
cubicweb/skeleton/tox.ini.tmpl
cubicweb/skeleton/uiprops.py.tmpl
cubicweb/skeleton/views.py.tmpl
cubicweb/toolsutils.py
--- a/cubicweb/devtools/devctl.py	Thu Sep 08 11:57:46 2016 +0200
+++ b/cubicweb/devtools/devctl.py	Thu May 19 14:27:28 2016 +0200
@@ -619,29 +619,25 @@
             raise BadCommandUsage(
                 'cube name must be a valid python module name')
         verbose = self.get('verbose')
-        cubesdir = self.get('directory')
-        if not cubesdir:
+        destdir = self.get('directory')
+        if not destdir:
             cubespath = ServerConfiguration.cubes_search_path()
             if len(cubespath) > 1:
                 raise BadCommandUsage(
                     "can't guess directory where to put the new cube."
                     " Please specify it using the --directory option")
-            cubesdir = cubespath[0]
-        if not osp.isdir(cubesdir):
-            print("-> creating cubes directory", cubesdir)
+            destdir = cubespath[0]
+        if not osp.isdir(destdir):
+            print("-> creating cubes directory", destdir)
             try:
-                mkdir(cubesdir)
+                mkdir(destdir)
             except OSError as err:
                 self.fail("failed to create directory %r\n(%s)"
-                          % (cubesdir, err))
-        cubedir = osp.join(cubesdir, cubename)
-        if osp.exists(cubedir):
-            self.fail("%s already exists!" % cubedir)
-        skeldir = osp.join(BASEDIR, 'skeleton')
+                          % (destdir, err))
         default_name = 'cubicweb-%s' % cubename.lower().replace('_', '-')
         if verbose:
             distname = input('Debian name for your cube ? [%s]): '
-                                 % default_name).strip()
+                             % default_name).strip()
             if not distname:
                 distname = default_name
             elif not distname.startswith('cubicweb-'):
@@ -652,13 +648,19 @@
         if not re.match('[a-z][-a-z0-9]*$', distname):
             raise BadCommandUsage(
                 'cube distname should be a valid debian package name')
+        cubedir = osp.join(destdir, distname)
+        if osp.exists(cubedir):
+            self.fail("%s already exists!" % cubedir)
+        skeldir = osp.join(BASEDIR, 'skeleton')
         longdesc = shortdesc = input(
             'Enter a short description for your cube: ')
         if verbose:
             longdesc = input(
                 'Enter a long description (leave empty to reuse the short one): ')
-        dependencies = {'cubicweb': '>= %s' % cubicwebversion,
-                        'six': '>= 1.4.0',}
+        dependencies = {
+            'six': '>= 1.4.0',
+            'cubicweb': '>= %s' % cubicwebversion,
+        }
         if verbose:
             dependencies.update(self._ask_for_dependencies())
         context = {'cubename' : cubename,
--- a/cubicweb/devtools/test/unittest_devctl.py	Thu Sep 08 11:57:46 2016 +0200
+++ b/cubicweb/devtools/test/unittest_devctl.py	Thu May 19 14:27:28 2016 +0200
@@ -44,25 +44,33 @@
         assertItemsEqual = TestCase.assertCountEqual
 
     def test_newcube(self):
-        expected = ['i18n', 'hooks.py', 'setup.py', 'views.py', 'test',
-                    'migration', 'entities.py', 'MANIFEST.in', 'schema.py',
-                    'cubicweb-foo.spec', '__init__.py', 'debian', 'data',
-                    '__pkginfo__.py', 'README', 'tox.ini']
+        expected_project_content = ['setup.py', 'test', 'MANIFEST.in',
+                                    'cubicweb_foo',
+                                    'cubicweb-foo.spec', 'debian', 'README',
+                                    'tox.ini']
+        expected_package_content = ['i18n', 'hooks.py', 'views.py',
+                                    'migration', 'entities.py', 'schema.py',
+                                    '__init__.py', 'data', '__pkginfo__.py']
         tmpdir = tempfile.mkdtemp(prefix="temp-cwctl-newcube")
         try:
             retcode, stdout = newcube(tmpdir, 'foo')
             self.assertEqual(retcode, 0, msg=to_unicode(stdout))
-            self.assertItemsEqual(os.listdir(osp.join(tmpdir, 'foo')), expected)
+            project_dir = osp.join(tmpdir, 'cubicweb-foo')
+            project_content = os.listdir(project_dir)
+            package_dir = osp.join(project_dir, 'cubicweb_foo')
+            package_content = os.listdir(package_dir)
+            self.assertItemsEqual(project_content, expected_project_content)
+            self.assertItemsEqual(package_content, expected_package_content)
         finally:
             shutil.rmtree(tmpdir, ignore_errors=True)
-        self.assertEqual(retcode, 0, msg=stdout)
 
     def test_flake8(self):
         """Ensure newcube built from skeleton is flake8-compliant"""
         tmpdir = tempfile.mkdtemp(prefix="temp-cwctl-newcube-flake8")
         try:
             newcube(tmpdir, 'foo')
-            cmd = [sys.executable, '-m', 'flake8', osp.join(tmpdir, 'foo')]
+            cmd = [sys.executable, '-m', 'flake8',
+                   osp.join(tmpdir, 'cubicweb-foo', 'cubicweb_foo')]
             proc = Popen(cmd, stdout=PIPE, stderr=STDOUT)
             retcode = proc.wait()
         finally:
--- a/cubicweb/skeleton/__init__.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-"""cubicweb-%(cubename)s application package
-
-%(longdesc)s
-"""
--- a/cubicweb/skeleton/__pkginfo__.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +0,0 @@
-# pylint: disable=W0622
-"""%(distname)s application packaging information"""
-
-from os import listdir as _listdir
-from os.path import join, isdir
-from glob import glob
-
-
-modname = '%(cubename)s'
-distname = '%(distname)s'
-
-numversion = (0, 1, 0)
-version = '.'.join(str(num) for num in numversion)
-
-license = '%(license)s'
-author = '%(author)s'
-author_email = '%(author-email)s'
-description = '%(shortdesc)s'
-web = 'http://www.cubicweb.org/project/%%s' %% distname
-
-__depends__ = %(dependencies)s
-__recommends__ = {}
-
-classifiers = [
-    'Environment :: Web Environment',
-    'Framework :: CubicWeb',
-    'Programming Language :: Python',
-    'Programming Language :: JavaScript',
-]
-
-THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
-
-
-def listdir(dirpath):
-    return [join(dirpath, fname) for fname in _listdir(dirpath)
-            if fname[0] != '.' and not fname.endswith('.pyc') and
-            not fname.endswith('~') and
-            not isdir(join(dirpath, fname))]
-
-data_files = [
-    # common files
-    [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
-]
-# check for possible extended cube layout
-for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
-              'wdoc', 'i18n', 'migration'):
-    if isdir(dname):
-        data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
-# Note: here, you'll need to add subdirectories if you want
-# them to be included in the debian package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/__init__.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,4 @@
+"""cubicweb-%(cubename)s application package
+
+%(longdesc)s
+"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/__pkginfo__.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,50 @@
+# pylint: disable=W0622
+"""%(distname)s application packaging information"""
+
+from os import listdir as _listdir
+from os.path import join, isdir
+from glob import glob
+
+
+modname = '%(cubename)s'
+distname = '%(distname)s'
+
+numversion = (0, 1, 0)
+version = '.'.join(str(num) for num in numversion)
+
+license = '%(license)s'
+author = '%(author)s'
+author_email = '%(author-email)s'
+description = '%(shortdesc)s'
+web = 'http://www.cubicweb.org/project/%%s' %% distname
+
+__depends__ = %(dependencies)s
+__recommends__ = {}
+
+classifiers = [
+    'Environment :: Web Environment',
+    'Framework :: CubicWeb',
+    'Programming Language :: Python',
+    'Programming Language :: JavaScript',
+]
+
+THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
+
+
+def listdir(dirpath):
+    return [join(dirpath, fname) for fname in _listdir(dirpath)
+            if fname[0] != '.' and not fname.endswith('.pyc') and
+            not fname.endswith('~') and
+            not isdir(join(dirpath, fname))]
+
+data_files = [
+    # common files
+    [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
+]
+# check for possible extended cube layout
+for dname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data',
+              'wdoc', 'i18n', 'migration'):
+    if isdir(dname):
+        data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
+# Note: here, you'll need to add subdirectories if you want
+# them to be included in the debian package
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/data/cubes.CUBENAME.css	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,1 @@
+/* cube-specific CSS */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/data/cubes.CUBENAME.js	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,1 @@
+// This contains cube-specific javascript
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/entities.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s entity's classes"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/hooks.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s specific hooks and operations"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/i18n/en.po	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,9 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/i18n/es.po	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,9 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/i18n/fr.po	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,9 @@
+msgid ""
+msgstr ""
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Generated-By: pygettext.py 1.5\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/migration/postcreate.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,13 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s postcreate script, executed at instance creation time or when
+the cube is added to an existing instance.
+
+You could setup site properties or a workflow here for example.
+"""
+
+# Example of site property change
+#set_property('ui.site-title', "<sitename>")
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/migration/precreate.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,10 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s precreate script, executed at instance creation time or when
+the cube is added to an existing instance, before the schema is serialized.
+
+This is typically to create groups referenced by the cube'schema.
+"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/schema.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s schema"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/sobjects.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s repository side views, usually for notification"""
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/uiprops.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,16 @@
+# -*- coding: utf-8 -*-
+###############################################################################
+#
+# Put here information about external resources / styles used by your cube,
+# or to overides existing UI properties.
+#
+# Existing properties are available through the `sheet` dictionary available
+# in the global namespace. You also have access to a `data` function which
+# will return proper url for resources in the 'data' directory.
+#
+# /!\ this file should not be imported /!\
+###############################################################################
+
+# CSS stylesheets to include in HTML headers
+# uncomment the line below to use template specific stylesheet
+# STYLESHEETS = sheet['STYLESHEETS'] + [data('cubes.%(cubename)s.css')]
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/cubicweb_CUBENAME/views.py.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,6 @@
+# -*- coding: utf-8 -*-
+# copyright %(year)s %(author)s, all rights reserved.
+# contact %(author-web-site)s -- mailto:%(author-email)s
+#
+%(long-license)s
+"""%(distname)s views/forms/actions/components for web ui"""
--- a/cubicweb/skeleton/data/cubes.CUBENAME.css	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-/* cube-specific CSS */
--- a/cubicweb/skeleton/data/cubes.CUBENAME.js	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-// This contains cube-specific javascript
\ No newline at end of file
--- a/cubicweb/skeleton/entities.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s entity's classes"""
--- a/cubicweb/skeleton/hooks.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s specific hooks and operations"""
--- a/cubicweb/skeleton/i18n/en.po	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-msgid ""
-msgstr ""
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
-
--- a/cubicweb/skeleton/i18n/es.po	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-msgid ""
-msgstr ""
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
-
--- a/cubicweb/skeleton/i18n/fr.po	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-msgid ""
-msgstr ""
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=UTF-8\n"
-"Content-Transfer-Encoding: 8bit\n"
-"Generated-By: pygettext.py 1.5\n"
-"Plural-Forms: nplurals=2; plural=(n > 1);\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI +ZONE\n"
-
--- a/cubicweb/skeleton/migration/postcreate.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,13 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s postcreate script, executed at instance creation time or when
-the cube is added to an existing instance.
-
-You could setup site properties or a workflow here for example.
-"""
-
-# Example of site property change
-#set_property('ui.site-title', "<sitename>")
--- a/cubicweb/skeleton/migration/precreate.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s precreate script, executed at instance creation time or when
-the cube is added to an existing instance, before the schema is serialized.
-
-This is typically to create groups referenced by the cube'schema.
-"""
--- a/cubicweb/skeleton/schema.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s schema"""
--- a/cubicweb/skeleton/sobjects.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s repository side views, usually for notification"""
--- a/cubicweb/skeleton/tox.ini	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
-[tox]
-envlist = py27,py34,flake8
-
-[testenv]
-sitepackages = true
-deps =
-  pytest
-commands =
-  {envpython} -m pytest {posargs:test}
-
-[testenv:flake8]
-skip_install = true
-whitelist_externals =
-  flake8
-deps =
-  flake8
-commands = flake8
-
-[flake8]
-exclude = migration/*,test/data/*,setup.py,.tox/*
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/cubicweb/skeleton/tox.ini.tmpl	Thu May 19 14:27:28 2016 +0200
@@ -0,0 +1,20 @@
+[tox]
+envlist = py27,py34,flake8
+
+[testenv]
+sitepackages = true
+deps =
+  pytest
+commands =
+  {envpython} -m pytest {posargs:test}
+
+[testenv:flake8]
+skip_install = true
+whitelist_externals =
+  flake8
+deps =
+  flake8
+commands = flake8
+
+[flake8]
+exclude = cubicweb_%(cubename)s/migration/*,test/data/*,setup.py,.tox/*
--- a/cubicweb/skeleton/uiprops.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-# -*- coding: utf-8 -*-
-###############################################################################
-#
-# Put here information about external resources / styles used by your cube,
-# or to overides existing UI properties.
-#
-# Existing properties are available through the `sheet` dictionary available
-# in the global namespace. You also have access to a `data` function which
-# will return proper url for resources in the 'data' directory.
-#
-# /!\ this file should not be imported /!\
-###############################################################################
-
-# CSS stylesheets to include in HTML headers
-# uncomment the line below to use template specific stylesheet
-# STYLESHEETS = sheet['STYLESHEETS'] + [data('cubes.%(cubename)s.css')]
--- a/cubicweb/skeleton/views.py.tmpl	Thu Sep 08 11:57:46 2016 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-# -*- coding: utf-8 -*-
-# copyright %(year)s %(author)s, all rights reserved.
-# contact %(author-web-site)s -- mailto:%(author-email)s
-#
-%(long-license)s
-"""%(distname)s views/forms/actions/components for web ui"""
--- a/cubicweb/toolsutils.py	Thu Sep 08 11:57:46 2016 +0200
+++ b/cubicweb/toolsutils.py	Thu May 19 14:27:28 2016 +0200
@@ -131,6 +131,9 @@
     targetdir = normpath(targetdir)
     for dirpath, dirnames, filenames in walk(skeldir):
         tdirpath = dirpath.replace(skeldir, targetdir)
+        if 'cubicweb_CUBENAME' in tdirpath:
+            tdirpath = tdirpath.replace('cubicweb_CUBENAME',
+                                        'cubicweb_' + context['cubename'])
         create_dir(tdirpath)
         for fname in filenames:
             if any(fnmatch(fname, pat) for pat in exclude):