1
|
#! /usr/bin/env python
|
2
|
|
3
|
import os
|
4
|
import distutils.core
|
5
|
from quixote.ptl.qx_distutils import qx_build_py
|
6
|
|
7
|
def data_tree(destdir, sourcedir):
|
8
|
extensions = ['.css', '.png', '.jpeg', '.jpg', '.xml', '.html', '.js', '.ezt', '.gif']
|
9
|
r = []
|
10
|
for root, dirs, files in os.walk(sourcedir):
|
11
|
l = [os.path.join(root, x) for x in files if os.path.splitext(x)[1] in extensions]
|
12
|
r.append( (root.replace(sourcedir, destdir, 1), l) )
|
13
|
if 'CVS' in dirs:
|
14
|
dirs.remove('CVS')
|
15
|
if '.svn' in dirs:
|
16
|
dirs.remove('.svn')
|
17
|
return r
|
18
|
|
19
|
distutils.core.setup(
|
20
|
name = 'wcs-au-quotidien',
|
21
|
version = '1.0.0',
|
22
|
maintainer = 'Frederic Peters',
|
23
|
maintainer_email = 'fpeters@entrouvert.com',
|
24
|
package_dir = { 'extra': 'extra' },
|
25
|
packages = ['extra', 'extra.modules', 'extra.modules.pyatom'],
|
26
|
cmdclass = {'build_py': qx_build_py},
|
27
|
data_files = data_tree('share/wcs/texts', 'texts') +\
|
28
|
data_tree('share/wcs/themes/auquotidien', 'theme') +\
|
29
|
data_tree('share/auquotidien/apache-errors', 'apache-errors') +\
|
30
|
[('share/wcs/', ('au-quotidien-wcs-settings.xml',))]
|
31
|
)
|