Updated Service Directory url and cleaned some comments
[unfold.git] / setup.py
1 #!/usr/bin/python
2 #
3 # Setup script for myslice+unfold
4 #
5 # Thierry Parmentelat <thierry.parmentelat@inria.fr>
6 # INRIA (c) 2013
7
8 import os.path
9 import shutil
10 from glob import glob
11 from distutils.core import setup
12
13 # we don't have a final list so let's keep it simple for now
14 packages= [ os.path.dirname(init) for init in (glob("*/__init__.py")+glob("*/*/__init__.py")) ]
15 print packages
16
17 # Avoid troubles : clean /usr/share/unfold/
18 #shutil.rmtree('/usr/share/unfold/')
19
20 def images (dir):
21     return glob( dir+"/*.png") + glob ( dir+"/*.gif")
22 def javascript (dir):
23     return glob( dir+"/*.js")
24 def stylesheets (dir):
25     return glob( dir+"/*.css")
26
27
28 setup(packages = packages,
29       # xxx somehow this does not seem to show up in debian packaging
30       scripts = [ 'apache/unfold-init-ssl.sh' ],
31       data_files = [ 
32           ( '/usr/share/unfold/static/js', javascript('static/js')),
33           ( '/usr/share/unfold/static/css', stylesheets ('static/css')),
34           ( '/usr/share/unfold/static/img', images ('static/img')),
35 # for portal/          
36           ( '/usr/share/unfold/static/img/institutions', images ('static/img/institutions')),
37           ( '/usr/share/unfold/static/img/testbeds', images ('static/img/testbeds')),
38           ( '/usr/share/unfold/static/fonts', glob ('static/fonts/*')),
39           ( '/usr/share/unfold/templates', glob ('templates/*')),
40           ( 'apache', [ 'apache/unfold.conf', 'apache/unfold-ssl.conf', 'apache/unfold.wsgi' ]),
41           ( '/etc/unfold/trusted_roots', []),
42           ( '/var/unfold', []),
43         ])