cleanup skel packaging
authorSylvain Thenault <sylvain.thenault@logilab.fr>
Fri, 19 Dec 2008 14:53:40 +0100
changeset 232 f1f26070117d
parent 231 d740f5f55d30
child 233 cd2f4ef6af37
cleanup skel packaging
skeleton/__pkginfo__.py.tmpl
skeleton/setup.py
--- a/skeleton/__pkginfo__.py.tmpl	Fri Dec 19 14:53:06 2008 +0100
+++ b/skeleton/__pkginfo__.py.tmpl	Fri Dec 19 14:53:40 2008 +0100
@@ -19,7 +19,7 @@
 from os import listdir as _listdir
 from os.path import join, isdir
 
-web = ''
+web = 'http://www.cubicweb.org/project/%s' % distname
 
 pyversions = ['2.4']
 
@@ -39,7 +39,7 @@
         [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', 'schema', 'data', 'i18n', 'migration'):
+    for dirname in ('entities', 'views', 'sobjects', 'hooks', 'schema', 'data', 'i18n', 'migration'):
         if isdir(dirname):
             data_files.append([join(THIS_CUBE_DIR, dirname), listdir(dirname)])
     # Note: here, you'll need to add subdirectories if you want
--- a/skeleton/setup.py	Fri Dec 19 14:53:06 2008 +0100
+++ b/skeleton/setup.py	Fri Dec 19 14:53:40 2008 +0100
@@ -17,39 +17,24 @@
 # 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 """ Generic Setup script, takes package info from __pkginfo__.py file """
 
-import os
-import sys
-import shutil
 from distutils.core import setup
-from distutils import command
-from distutils.command import install_lib
-from os.path import isdir, exists, join, walk
 
 # import required features
 from __pkginfo__ import distname, version, license, short_desc, long_desc, \
      web, author, author_email
-try:
-    from __pkginfo__ import scripts
-except ImportError:
-    scripts = []
+# import optional features
 try:
     from __pkginfo__ import data_files
 except ImportError:
     data_files = None
-    
-def ensure_scripts(linux_scripts):
-    """creates the proper script names required for each platform
-    (taken from 4Suite)
-    """
-    from distutils import util
-    if util.get_platform()[:3] == 'win':
-        scripts_ = [script + '.bat' for script in linux_scripts]
-    else:
-        scripts_ = linux_scripts
-    return scripts_
+try:
+    from __pkginfo__ import include_dirs
+except ImportError:
+    include_dirs = []
 
 def install(**kwargs):
     """setup entry point"""
+    #kwargs['distname'] = modname
     return setup(name=distname,
                  version=version,
                  license=license,
@@ -58,7 +43,6 @@
                  author=author,
                  author_email=author_email,
                  url=web,
-                 scripts=ensure_scripts(scripts),
                  data_files=data_files,
                  **kwargs)