Commit dfa2fd6f authored by Alain Leufroy's avatar Alain Leufroy
Browse files

[pkg] use argument *package_data*

Use the dedicaded setup's argument for files that are copied in the
package directory.

--HG--
branch : stable
parent f328ec853e18
......@@ -96,7 +96,13 @@ if '--home' in sys.argv:
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 @@ try:
[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:
......
......@@ -61,7 +61,7 @@ include_dirs = getattr(__pkginfo__, 'include_dirs', ())
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 @@ def install(**kwargs):
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,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment