New issue 144: Issuese packaging tortoisehg in rpm
http://bitbucket.org/tortoisehg/stable/issue/144/issuese-packaging-tortoisehg-in-rpm

kiilerix on Sat, 4 Apr 2009 14:47:23 +0200:

Description:
  I have packaged tortoisehg in an rpm for Fedora.

TortoiseHg is made to run from a source folder anywhere. When it is packaged as 
an rpm we know exactly where the files are, but they are not organized like in 
the source folder.

The following hacks worked around the issues for me. Do you have any ideas what 
you or I could do to reduce the number of hacks/patches? 

Are you aware of other places where path manipulation is used and might require 
attention?


# Don't put hardcoded path in sys.path; the python modules has been installed 
globally
sed -i 's,\~/tools/tortoisehg-dev,/usr/lib/python2.5/site-packages,g' 
contrib/hgtk contrib/nautilus-thg.py

# Don't use THG_ICON_PATH; we know where the icons are and it doesn't
sed -i 's|os.environ.get('\''THG_ICON_PATH'\'', 
None)|'\''/usr/share/pixmaps/tortoisehg/icons'\''|g' hggtk/shlib.py

# COPYING.txt is not installed under prog_root. It is a data file - but we just 
use it from docs.
sed -i 's|os.path.join(prog_root, 
"COPYING.txt")|'\''/usr/share/doc/tortoisehg-0.7.3/COPYING.txt'\''|g' 
hggtk/about.py

# setup.py installs hgproc in /usr/bin (it should probably be 
/usr/lib/tortoisehg ...)
sed -i 's|os.path.join(thgpath, 
'\''hgproc.py'\'')|'\''/usr/bin/hgproc.py'\''|g' contrib/nautilus-thg.py

# We know where the icons are ...
sed -i 's|os.path.join(thgpath, '\''icons'\'', 
'\''tortoise'\'')|'\''/usr/share/pixmaps/tortoisehg/icons'\''|g' 
contrib/nautilus-thg.py


Responsible:
  tortoisehg
-- 
This is an issue notification from bitbucket.org.
You are receiving this either because you are the
owner of the issue, or you are following the issue.

------------------------------------------------------------------------------
_______________________________________________
Tortoisehg-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tortoisehg-develop

Reply via email to