pkg info cleanup, proper dependencies in pkginfo and debian control, setup.py fixes
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 06 Aug 2010 10:03:04 +0200
changeset 221 1f8273d23dae
parent 220 72715685d5e3
child 222 95ad22474c85
pkg info cleanup, proper dependencies in pkginfo and debian control, setup.py fixes
__pkginfo__.py
debian/control
setup.py
--- a/__pkginfo__.py	Fri Aug 06 10:02:32 2010 +0200
+++ b/__pkginfo__.py	Fri Aug 06 10:03:04 2010 +0200
@@ -8,13 +8,10 @@
 version = '.'.join(str(num) for num in numversion)
 
 license = 'LGPL'
-
+description = "blogging component for the CubicWeb framework"
 author = "Logilab"
 author_email = "contact@logilab.fr"
 web = 'http://www.cubicweb.org/project/%s' % distname
-
-description = "blogging component for the CubicWeb framework"
-
 classifiers = [
     'Environment :: Web Environment'
     'Framework :: CubicWeb',
@@ -22,22 +19,19 @@
     'Programming Language :: JavaScript',
     ]
 
-__depends_cubes__ = {'datafeed': None,
-                     }
 __depends__ = {'cubicweb': '>= 3.9.0'}
-for key, value in __depends_cubes__.items():
-    __depends__['cubicweb-'+key] = value
-__recommends_cubes__ = {'tag': None,
-                        'comment': '>= 1.6.3'}
-__recommends__ = {}
-for cube in __recommends_cubes__:
-    __recommends__['cubicweb-'+cube] = __recommends_cubes__[cube]
+__recommends__ = {'cubicweb-tag': None,
+                  'cubicweb-comment': '>= 1.6.3',
+                  'cubicweb-datafeed': None,
+                  'feedparser': None,
+                  'rdflib': None,
+                  }
 
 
-# package ###
+# packaging ###
 
 from os import listdir as _listdir
-from os.path import join, isdir, exists
+from os.path import join, isdir
 from glob import glob
 
 THIS_CUBE_DIR = join('share', 'cubicweb', 'cubes', modname)
@@ -53,6 +47,8 @@
     [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', 'i18n', 'migration'):
-    if isdir(dname):
-        data_files.append([join(THIS_CUBE_DIR, dname), listdir(dname)])
+for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration', 'wdoc'):
+    if isdir(dirname):
+        data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
+# Note: here, you'll need to add subdirectories if you want
+# them to be included in the debian package
--- a/debian/control	Fri Aug 06 10:02:32 2010 +0200
+++ b/debian/control	Fri Aug 06 10:03:04 2010 +0200
@@ -10,7 +10,7 @@
 Package: cubicweb-blog
 Architecture: all
 Depends: cubicweb-common (>= 3.9.0)
-Suggests: cubicweb-comment (>= 1.6.3), cubicweb-tag
+Suggests: cubicweb-comment (>= 1.6.3), cubicweb-tag, cubicweb-datafeed, python-feedparser, python-rdflib
 Description: blog component for the CubicWeb framework
  This CubicWeb component provides blogging functionnalities.
  .
--- a/setup.py	Fri Aug 06 10:02:32 2010 +0200
+++ b/setup.py	Fri Aug 06 10:03:04 2010 +0200
@@ -1,11 +1,8 @@
 #!/usr/bin/env python
 # pylint: disable-msg=W0404,W0622,W0704,W0613,W0152
-"""Generic Setup script, takes package info from __pkginfo__.py file.
+# copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
+# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
 
-:copyright: 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
-:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr
-:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses
-"""
 __docformat__ = "restructuredtext en"
 
 import os
@@ -145,12 +142,9 @@
     # install-layout option was introduced in 2.5.3-1~exp1
     elif sys.version_info < (2, 5, 4) and '--install-layout=deb' in sys.argv:
         sys.argv.remove('--install-layout=deb')
-    kwargs['package_dir'] = {modname : '.'}
-    packages = [modname] + get_packages(os.getcwd(), modname)
     if USE_SETUPTOOLS and install_requires:
         kwargs['install_requires'] = install_requires
         kwargs['dependency_links'] = dependency_links
-    kwargs['packages'] = packages
     return setup(name = distname,
                  version = version,
                  license = license,