source: publico/il.spdo/trunk/PasteDeploy-1.5.0-py2.6.egg/paste/deploy/paster_templates.py @ 5327

Última Alteração nesse arquivo desde 5327 foi 5327, incluída por fabianosantos, 8 anos atrás

Import inicial.

File size: 1.2 KB
Linha 
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
4
5from paste.script.templates import Template
6
7from paste.deploy.compat import print_
8
9
10class PasteDeploy(Template):
11
12    _template_dir = 'paster_templates/paste_deploy'
13    summary = "A web application deployed through paste.deploy"
14
15    egg_plugins = ['PasteDeploy']
16
17    required_templates = ['PasteScript#basic_package']
18
19    def post(self, command, output_dir, vars):
20        for prereq in ['PasteDeploy']:
21            command.insert_into_file(
22                os.path.join(output_dir, 'setup.py'),
23                'Extra requirements',
24                '%r,\n' % prereq,
25                indent=True)
26        command.insert_into_file(
27            os.path.join(output_dir, 'setup.py'),
28            'Entry points',
29            ('      [paste.app_factory]\n'
30             '      main = %(package)s.wsgiapp:make_app\n') % vars,
31            indent=False)
32        if command.verbose:
33            print_('*' * 72)
34            print_('* Run "paster serve docs/devel_config.ini" to run the sample application')
35            print_('* on http://localhost:8080')
36            print_('*' * 72)
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.