Changeset 111

Show
Ignore:
Timestamp:
12/06/06 19:23:19 (2 years ago)
Author:
trivoallan
Message:

made it possible to have projects with different versions of trac.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cleverbox/branches/0.1/cleverbox/scripts/admin.py

    r110 r111  
    750750<Location /%(client_name)s/%(project_name)s/trac> 
    751751  SetHandler mod_python 
     752  PythonPath "['%(trac_install_dir)s/lib/python2.3/site-packages'] + sys.path" 
    752753  PythonHandler trac.web.modpython_frontend 
    753754  PythonOption TracEnv %(clients_root)s/%(client_name)s/var/trac/%(project_name)s 
     
    776777# -- Files under src/ will be available on the web 
    777778AliasMatch /%(client_name)s/%(project_name)s/src(.*) /home/%(client_name)s/htdocs/%(project_name)s$1 
    778 """ % {'client_name'   : infos['client'], 
    779        'project_name'  : infos['short_name'], 
    780        'clients_root'  : self.getConfig('clients_root', 'general'), 
    781        'ldap_password' : self.getConfig('ldap_password', 'general') } 
     779""" % {'client_name'      : infos['client'], 
     780       'project_name'     : infos['short_name'], 
     781       'clients_root'     : self.getConfig('clients_root', 'general'), 
     782       'ldap_password'    : self.getConfig('ldap_password', 'general'), 
     783       'trac_install_dir' : self.getConfig('install_root', 'trac') } 
    782784 
    783785        apache_conf_filepath = os.path.join( self.envname, 'projects-available', '%s-%s' % (infos['client'], infos['short_name']) ) 
     
    812814                                infos['short_name'] ) 
    813815 
    814         cmd_data = { 'env_path'       : trac_env_path, 
    815                      'title'          : '"%s - %s - Trac"' % (infos['client'], infos['short_name']), 
    816                      'db_dsn'         : 'sqlite:db/trac.db', 
    817                      'svn_path'       : svn_path, 
    818                      'templates_path' : '/usr/share/trac/templates' } 
    819  
    820         trac_cmd = 'trac-admin %(env_path)s initenv %(title)s %(db_dsn)s %(svn_path)s %(templates_path)s' % cmd_data 
     816        cmd_data = { 'env_path'         : trac_env_path, 
     817                     'title'            : '"%s - %s - Trac"' % (infos['client'], infos['short_name']), 
     818                     'db_dsn'           : 'sqlite:db/trac.db', 
     819                     'svn_path'         : svn_path, 
     820                     'templates_path'   : '/%s/share/trac/templates' % self.getConfig('install_root', 'trac'), 
     821                     'trac_install_dir' : self.getConfig('install_root', 'trac')} 
     822 
     823        trac_cmd = '%(trac_install_dir)s/bin/trac-admin %(env_path)s initenv %(title)s %(db_dsn)s %(svn_path)s %(templates_path)s' % cmd_data 
    821824 
    822825        (stdin, stdout, stderr) = os.popen3( trac_cmd )