root/galaxy-central/eggs/PasteDeploy-1.3.3-py2.6.egg/paste/deploy/paster_templates.py

リビジョン 3, 1.2 KB (コミッタ: kohda, 14 年 前)

Install Unix tools  http://hannonlab.cshl.edu/galaxy_unix_tools/galaxy.html

行番号 
1# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
2# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
3import os
4from paste.script.templates import Template
5
6class PasteDeploy(Template):
7
8    _template_dir = 'paster_templates/paste_deploy'
9    summary = "A web application deployed through paste.deploy"
10   
11    egg_plugins = ['PasteDeploy']
12   
13    required_templates = ['PasteScript#basic_package']
14
15    def post(self, command, output_dir, vars):
16        for prereq in ['PasteDeploy']:
17            command.insert_into_file(
18                os.path.join(output_dir, 'setup.py'),
19                'Extra requirements',
20                '%r,\n' % prereq,
21                indent=True)
22        command.insert_into_file(
23            os.path.join(output_dir, 'setup.py'),
24            'Entry points',
25            ('      [paste.app_factory]\n'
26             '      main = %(package)s.wsgiapp:make_app\n') % vars,
27            indent=False)
28        if command.verbose:
29            print '*'*72
30            print '* Run "paster serve docs/devel_config.ini" to run the sample application'
31            print '* on http://localhost:8080'
32            print '*'*72
33       
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。