Modify ↓
Opened 20 years ago
Closed 18 years ago
#963 closed defect (fixed)
Trac's setup.py does not honor --home
Reported by: | Owned by: | Jonas Borgström | |
---|---|---|---|
Priority: | normal | Milestone: | 0.10 |
Component: | general | Version: | 0.8 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
In Python, it is possible to do something like
python setup.py install —home=/my/installation/prefix
However, unfortunately it does not seem to be supported by trac's setup.py.
Fix is trivial:
mstenber@mylly /work/tools/trac-0.8>diff -wu setup.py~ setup.py --- setup.py~ 2004-10-21 23:48:23.000000000 +0300 +++ setup.py 2004-11-19 11:29:03.000000000 +0200 @@ -30,9 +30,10 @@ self.siteconfig() def siteconfig(self): - templates_dir = os.path.join(self.prefix, 'share','trac','templates') - htdocs_dir = os.path.join(self.prefix, 'share','trac','htdocs') - wiki_dir = os.path.join(self.prefix, 'share','trac','wiki-default') + prefix = self.home or self.prefix + templates_dir = os.path.join(prefix, 'share','trac','templates') + htdocs_dir = os.path.join(prefix, 'share','trac','htdocs') + wiki_dir = os.path.join(prefix, 'share','trac','wiki-default') f = open(_p('trac/siteconfig.py'),'w') f.write("""
The self.home is None if —home is not specified, and otherwise the path. self.prefix is NOT SET if —home is used ⇒ problems ensue.
This works at least with my Python 2.3 - caveat emptor.
Attachments (0)
Change History (4)
comment:1 by , 19 years ago
comment:2 by , 19 years ago
Milestone: | → 1.0 |
---|
comment:3 by , 18 years ago
Milestone: | 1.0 → 0.10 |
---|
#3296 has been marked as duplicate of this ticket, and provides an enhanced patch.
Note:
See TracTickets
for help on using tickets.
#2524 has been marked as duplicate of this ticket.