cutehg in OSX

  • April 25, 2009
Table of Contents

UPDATE: murky native osx mercurial client is out

sed -i '' -e 's/port:tk//' /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/python26/Portfile

sudo port install python26
sudo port install py26-sip

Pyqt4 seemed to have problems with qt4.5 so I installed it with the QT available from the Trolltech website.

wget http://www.riverbankcomputing.co.uk/static/Downloads/PyQt4/PyQt-mac-gpl-4.4.4.tar.gz
tar xzvf PyQt-mac-gpl-4.4.4.tar.gz
cd PyQt-mac-gpl-4.4.4
python2.6 ./configure.py -q /Developer/Tools/Qt/qmake
make install

hg clone http://bitbucket.org/bfrog/cutehg-stable/
cd cutehg-stable
python2.6 setup.py install

After you install everything you might get an annoying bug looking as follows while using the annotate or history command:

UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-1: ordinal not in range(128) pyqt4

checking the python shell gives this:

python2.6
>>> import sys
>>> sys.getdefaultencoding()
'ascii'

This is easily fixed by doing:

echo "import sys
sys.setdefaultencoding('utf-8')" > /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/sitecustomize.py

What i don’t really get is why python won’t just use my LC_LOCALE/ALL but whatever.

HTH

comments powered by Disqus

Related Posts

A prettier Terminal in OS-X Part 3 (urxvt and screen)

I was a bit annoyed of having to set TERM=xterm-256color. A more or less proper solution can be found on the rxvt-unicode ml from John Eikenberry.

Read More

ViInutMate on github

I noticed some people try to reach that viinputmate page, which was supposed to be a better vi plugin for textmate but there’s nothing on it…

Read More

ctags with objective-c and css support

The default ex-ctags package does not support css or obj-c tags.

Read More