0001import os
0002from paste.script.templates import Template
0003
0004class Wareweb(Template):
0005
0006 _template_dir = 'paster_templates/wareweb'
0007 summary = "A Wareweb web application"
0008
0009 egg_plugins = ['Wareweb']
0010
0011 required_templates = ['PasteDeploy#paste_deploy']
0012
0013 def post(self, command, output_dir, vars):
0014 fn = os.path.join(output_dir, 'docs', 'devel_config.ini')
0015 if os.path.exists(fn) and not command.simulate:
0016 try:
0017 os.chmod(fn, 0111 | os.stat(fn).st_mode)
0018 except Exception, e:
0019 print "Could not make %s executable: %s" % (
0020 fn, e)
0021 else:
0022 print "Run %s to start a development server" % fn