Changeset 1985 in products


Ignore:
Timestamp:
Mar 24, 2010 11:45:08 AM (14 years ago)
Author:
chervol
Message:

qgplone3_buildout lined with ZopeSkel? plone3_buildout

File:
1 edited

Legend:

Unmodified
Added
Removed
  • QGSkel/trunk/qgskel/qgplone3_buildout.py

    r1411 r1985  
    1 from zopeskel.base import BaseTemplate 
    2 from zopeskel.base import var 
     1import copy 
     2from zopeskel import abstract_buildout 
     3from zopeskel.plone3_buildout import Plone3Buildout 
     4from zopeskel.vars import BoundedIntVar 
    35 
    4 class QGPlone3Buildout(BaseTemplate): 
     6VAR_HTTP = BoundedIntVar( 
     7    'http_port', 
     8    title='Backend1 HTTP Port', 
     9    description="Port that first Backend server will be serving. "\ 
     10                "Other backend' ports increments by 1 from this one.", 
     11    default='20001', 
     12    modes=(EXPERT,EASY), 
     13    page='Main', 
     14    help=""" 
     15This options lets you select the port # that Zope will use for serving 
     16HTTP on backnd ZEO clients. 
     17""", 
     18    min=10000, 
     19    max=65535, 
     20    ) 
     21 
     22class QGPlone3Buildout(Plone3Buildout): 
    523    _template_dir = 'templates/qgplone3_buildout' 
    6     summary = "A buildout for Plone 3 projects" 
     24    summary = "QG Buildout for Plone 3 projects" 
    725    required_templates = [] 
    826    use_cheetah = True 
    927 
    10     vars = [ 
    11         var('plone_version', 
    12             "Which Plone version to install", 
    13             default="3.2.2"), 
    14         var('zope2_install', 
    15             'Path to Zope 2 installation; leave blank to fetch one', 
    16             default=''), 
    17         var('plone_products_install', 
    18             'Path to directory containing Plone products; leave blank to fetch one', 
    19             default=''), 
    20         var('zope_user', 
    21             'Zope root admin user', 
    22             default='admin'), 
    23         var('zope_password', 
    24             'Zope root admin password', 
    25             default='admin'), 
    26         var('http_port', 
    27             'HTTP port (development port == http_port + 10 )', 
    28             default=8080), 
    29         var('http_port_be1', 
    30             "HTTP port for first Backend server. Other backend' ports increments " \ 
    31             "by 1 from this one.", default=20001), 
     28    vars = [] 
     29    vars = copy.deepcopy(abstract_buildout.AbstractBuildout.vars) 
     30    vars.extend( 
     31           [ abstract_buildout.VAR_PLONEVER, 
     32             abstract_buildout.VAR_Z2_INSTALL, 
     33             abstract_buildout.VAR_PLONE_PRODUCTS, 
     34             abstract_buildout.VAR_ZOPE_USER, 
     35             abstract_buildout.VAR_ZOPE_PASSWD, 
     36             abstract_buildout.VAR_HTTP, 
     37             VAR_HTTP_BE1 
    3238        ] 
    33  
    34     def pre(self, command, output_dir, vars): 
    35         vars['oldplone'] = vars['plone_version'].startswith("3.0") or \ 
    36                             vars['plone_version'].startswith("3.1") 
    37         vars['veryoldplone'] = vars['plone_version'].startswith("2.") 
    38         if vars['veryoldplone']: 
    39             vars['zope2_version'] = "2.9.10" 
    40         vars['newplone'] = not vars['veryoldplone'] and not vars['oldplone'] 
    41         vars['http_port_devel'] = int(vars['http_port']) + 10 
    42         super(QGPlone3Buildout, self).pre(command, output_dir, vars) 
    43  
    44     def post(self, command, output_dir, vars): 
    45         print "-----------------------------------------------------------" 
    46         print "Generation finished" 
    47         print "You probably want to run python bootstrap.py and then edit" 
    48         print "buildout.cfg before running bin/buildout -v" 
    49         print 
    50         print "See README.txt for details" 
    51         print "-----------------------------------------------------------" 
     39    ) 
Note: See TracChangeset for help on using the changeset viewer.