# HG changeset patch # User Alain Leufroy # Date 1287164938 -7200 # Node ID 6b2e1e8d3a2273ddcc2bd530d66c011118e8dc99 # Parent f328ec853e18b390dbdd09fa3b1f830004c46e7e [pkg] use argument *package_data* Use the dedicaded setup's argument for files that are copied in the package directory. diff -r f328ec853e18 -r 6b2e1e8d3a22 __pkginfo__.py --- a/__pkginfo__.py Fri Oct 15 17:00:09 2010 +0200 +++ b/__pkginfo__.py Fri Oct 15 19:48:58 2010 +0200 @@ -96,7 +96,13 @@ else: pydir = join('python' + _pyversion, 'site-packages') +# data files that shall be copied into the main package directory +package_data = { + 'cubicweb.web.views':['*.pt'], + } + try: + # data files that shall be copied outside the main package directory data_files = [ # server data [join('share', 'cubicweb', 'schemas'), @@ -119,10 +125,6 @@ [join(_wdocimages_dir, fname) for fname in listdir(_wdocimages_dir)]], [join('share', 'cubicweb', 'cubes', 'shared', 'i18n'), [join(_i18n_dir, fname) for fname in listdir(_i18n_dir)]], - # XXX: drop .pt files - [join('lib', pydir, 'cubicweb', 'web', 'views'), - [join(_views_dir, fname) for fname in listdir(_views_dir) - if fname.endswith('.pt')]], # skeleton ] except OSError: diff -r f328ec853e18 -r 6b2e1e8d3a22 setup.py --- a/setup.py Fri Oct 15 17:00:09 2010 +0200 +++ b/setup.py Fri Oct 15 19:48:58 2010 +0200 @@ -61,7 +61,7 @@ data_files = getattr(__pkginfo__, 'data_files', None) subpackage_of = getattr(__pkginfo__, 'subpackage_of', None) ext_modules = getattr(__pkginfo__, 'ext_modules', None) - +package_data = getattr(__pkginfo__, 'package_data', {}) BASE_BLACKLIST = ('CVS', 'debian', 'dist', 'build', '__buildlog') IGNORED_EXTENSIONS = ('.pyc', '.pyo', '.elc') @@ -194,6 +194,7 @@ if USE_SETUPTOOLS: kwargs['install_requires'] = install_requires kwargs['packages'] = packages + kwargs['package_data'] = package_data return setup(name=distname, version=version, license=license, url=web, description=description, long_description=long_description, author=author, author_email=author_email,