X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=setup.py;h=07e121be48ccead5467da39edc92b02d773b5e4e;hb=refs%2Fheads%2Ffed4fire;hp=157641a970cf13871b96c69404e46afec54b9701;hpb=fea9b7e286cc86f11844e371d67d184198afc287;p=myslice.git diff --git a/setup.py b/setup.py index 157641a9..07e121be 100644 --- a/setup.py +++ b/setup.py @@ -1,24 +1,43 @@ #!/usr/bin/python # -# Setup script for myslice +# Setup script for myslice+unfold # # Thierry Parmentelat # INRIA (c) 2013 import os.path +import shutil from glob import glob from distutils.core import setup # we don't have a final list so let's keep it simple for now packages= [ os.path.dirname(init) for init in (glob("*/__init__.py")+glob("*/*/__init__.py")) ] +print packages + +# Avoid troubles : clean /usr/share/unfold/ +#shutil.rmtree('/usr/share/unfold/') + +def images (dir): + return glob( dir+"/*.png") + glob ( dir+"/*.gif") +def javascript (dir): + return glob( dir+"/*.js") +def stylesheets (dir): + return glob( dir+"/*.css") + setup(packages = packages, - scripts = [], + # xxx somehow this does not seem to show up in debian packaging + scripts = [ 'apache/unfold-init-ssl.sh' ], data_files = [ - ( 'static/js', glob ('static/js/*')), - ( 'static/css', glob ('static/css/*')), - ( 'static/img', glob ('static/img/*')), - ( 'static/fonts', glob ('static/fonts/*')), - ( 'templates', glob ('templates/*')), - ( 'apache', [ 'apache/myslice.conf' ]), + ( '/usr/share/unfold/static/js', javascript('static/js')), + ( '/usr/share/unfold/static/css', stylesheets ('static/css')), + ( '/usr/share/unfold/static/img', images ('static/img')), +# for portal/ + ( '/usr/share/unfold/static/img/institutions', images ('static/img/institutions')), + ( '/usr/share/unfold/static/img/testbeds', images ('static/img/testbeds')), + ( '/usr/share/unfold/static/fonts', glob ('static/fonts/*')), + ( '/usr/share/unfold/templates', glob ('templates/*')), + ( 'apache', [ 'apache/unfold.conf', 'apache/unfold-ssl.conf', 'apache/unfold.wsgi' ]), + ( '/etc/unfold/trusted_roots', []), + ( '/var/unfold', []), ])