Edgewall Software

Ticket #963 (closed defect: fixed)

Opened 4 years ago

Last modified 2 years ago

Trac's setup.py does not honor --home

Reported by: markus.stenberg@… Owned by: jonas
Priority: normal Milestone: 0.10
Component: general Version: 0.8
Severity: minor Keywords:
Cc:

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

Change History

Changed 3 years ago by cmlenz

#2524 has been marked as duplicate of this ticket.

Changed 3 years ago by cmlenz

  • milestone set to 1.0

Changed 2 years ago by cmlenz

  • milestone changed from 1.0 to 0.10

#3296 has been marked as duplicate of this ticket, and provides an enhanced patch.

Changed 2 years ago by mgood

  • status changed from new to closed
  • resolution set to fixed

Ok. Added in [3449].

Add/Change #963 (Trac's setup.py does not honor --home)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.