Edgewall Software

Ticket #3296: trac-home-patch1.patch

File trac-home-patch1.patch, 1.3 KB (added by trac@…, 3 years ago)

patch for setup.py

  • setup.py

     
    3131         self.siteconfig() 
    3232 
    3333     def siteconfig(self): 
    34          conf_dir = os.path.join(self.prefix, 'share', 'trac', 'conf') 
    35          templates_dir = os.path.join(self.prefix, 'share', 'trac', 'templates') 
    36          htdocs_dir = os.path.join(self.prefix, 'share', 'trac', 'htdocs') 
    37          wiki_dir = os.path.join(self.prefix, 'share', 'trac', 'wiki-default') 
    38          macros_dir = os.path.join(self.prefix, 'share', 'trac', 'wiki-macros') 
    39          plugins_dir = os.path.join(self.prefix, 'share', 'trac', 'plugins') 
     34         path = self.prefix or self.home 
     35         path = os.path.expanduser(path) 
     36         conf_dir = os.path.join(path, 'share', 'trac', 'conf') 
     37         templates_dir = os.path.join(path, 'share', 'trac', 'templates') 
     38         htdocs_dir = os.path.join(path, 'share', 'trac', 'htdocs') 
     39         wiki_dir = os.path.join(path, 'share', 'trac', 'wiki-default') 
     40         macros_dir = os.path.join(path, 'share', 'trac', 'wiki-macros') 
     41         plugins_dir = os.path.join(path, 'share', 'trac', 'plugins') 
    4042         f = open(_p('trac/siteconfig.py'), 'w') 
    4143         f.write(""" 
    4244# PLEASE DO NOT EDIT THIS FILE!