36 lines
1.3 KiB
Python
36 lines
1.3 KiB
Python
#! /usr/bin/env python
|
|
|
|
import os
|
|
import distutils.core
|
|
from quixote.ptl.qx_distutils import qx_build_py
|
|
|
|
def data_tree(destdir, sourcedir):
|
|
extensions = ['.css', '.png', '.jpeg', '.jpg', '.xml', '.html', '.js', '.ezt', '.gif']
|
|
r = []
|
|
for root, dirs, files in os.walk(sourcedir):
|
|
l = [os.path.join(root, x) for x in files if os.path.splitext(x)[1] in extensions]
|
|
r.append( (root.replace(sourcedir, destdir, 1), l) )
|
|
if 'CVS' in dirs:
|
|
dirs.remove('CVS')
|
|
if '.svn' in dirs:
|
|
dirs.remove('.svn')
|
|
if '.git' in dirs:
|
|
dirs.remove('.git')
|
|
return r
|
|
|
|
distutils.core.setup(
|
|
name = 'wcs-asec',
|
|
version = '0.5',
|
|
maintainer = 'Frederic Peters',
|
|
maintainer_email = 'fpeters@entrouvert.com',
|
|
package_dir = { 'extra': 'extra' },
|
|
packages = ['extra', 'extra.modules'],
|
|
scripts = ['create_asec_user.py', 'check_asec_vhost.py'],
|
|
cmdclass = {'build_py': qx_build_py},
|
|
data_files = [('share/wcs/', ('asec-wcs-settings.xml', 'asec-welcome-email'))] + \
|
|
data_tree('share/wcs/web/', 'data/web/') + \
|
|
data_tree('share/wcs/texts', 'texts') + \
|
|
data_tree('share/wcs/themes/asec', 'themes/asec') + \
|
|
data_tree('share/wcs/themes/asec-green', 'themes/asec-green')
|
|
)
|