summaryrefslogtreecommitdiffstats
path: root/idp/setup.py
blob: 737fb80ab349fb6337779994b85b1c19f154edda (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#! /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) )
    return r

distutils.core.setup(
        name = 'authentic-pratic',
        version = '1.0.0',
        maintainer = 'Frederic Peters',
        maintainer_email = 'fpeters@entrouvert.com',
        package_dir = { 'extra': 'extra' },
        packages = ['extra', 'extra.modules'],
        cmdclass = {'build_py': qx_build_py},
        data_files = data_tree('share/authentic/themes/', 'theme/'),
    )