0.6.1: include tests files in package stable 1.6.1
authorKatia Saurfelt <katia.saurfelt@logilab.fr>
Fri, 16 Apr 2010 15:58:31 +0200
branchstable
changeset 110 36d3106df60c
parent 109 9cc78cbf5813
child 111 4b1b08d844a3
0.6.1: include tests files in package
MANIFEST.in
__pkginfo__.py
debian/changelog
--- a/MANIFEST.in	Thu Apr 15 18:30:48 2010 +0200
+++ b/MANIFEST.in	Fri Apr 16 15:58:31 2010 +0200
@@ -2,3 +2,5 @@
 recursive-include data external_resources *.gif *.js
 recursive-include i18n *.pot *.po
 recursive-include migration *.py
+recursive-include test *.py
+recursive-include test/data bootstrap_cubes  *.py
--- a/__pkginfo__.py	Thu Apr 15 18:30:48 2010 +0200
+++ b/__pkginfo__.py	Fri Apr 16 15:58:31 2010 +0200
@@ -4,7 +4,7 @@
 modname = 'keyword'
 distname = "cubicweb-keyword"
 
-numversion = (1, 6, 0)
+numversion = (1, 6, 1)
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL'
@@ -56,22 +56,33 @@
 __depends__ = {'cubicweb': '>= 3.6.0'}
 __use__ = tuple(__depends_cubes__)
 
-from os import listdir
-from os.path import join
+from os import listdir as _listdir
+from os.path import join, isdir
+from glob import glob
+
+THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
 
-CUBES_DIR = join('share', 'cubicweb', 'cubes')
+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))]
 try:
     data_files = [
-        [join(CUBES_DIR, 'keyword'),
-         [fname for fname in listdir('.')
-          if fname.endswith('.py') and fname != 'setup.py']],
-        [join(CUBES_DIR, 'keyword', 'data'),
-         [join('data', fname) for fname in listdir('data')]],
-        [join(CUBES_DIR, 'keyword', 'i18n'),
-         [join('i18n', fname) for fname in listdir('i18n')]],
-        [join(CUBES_DIR, 'keyword', 'migration'),
-         [join('migration', fname) for fname in listdir('migration')]],
-        ]
+        # common files
+        [THIS_CUBE_DIR, [fname for fname in glob('*.py') if fname != 'setup.py']],
+        [join(THIS_CUBE_DIR, 'test'), [fname for fname in glob('test/*.py')]],
+
+    ]
+    for dname in ('data', '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
+    for dname in ('data', ):
+        data_files.append([join(THIS_CUBE_DIR, 'test', dname), listdir(join('test', dname))])
+
 except OSError:
     # we are in an installed directory
     pass
--- a/debian/changelog	Thu Apr 15 18:30:48 2010 +0200
+++ b/debian/changelog	Fri Apr 16 15:58:31 2010 +0200
@@ -1,3 +1,9 @@
+cubicweb-keyword (1.6.1-1) unstable; urgency=low
+
+  * new upstream release
+
+ -- Katia Saurfelt <katia.saurfelt@logilab.fr>  Fri, 16 Apr 2010 11:13:12 +0100
+
 cubicweb-keyword (1.6.0-1) unstable; urgency=low
 
   * new upstream release