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 1 (awesome is awesome!)

o I recently switched over to awesomewm on my desktop because either the desktop wm’s suck(kde,gnome) or fluxbox,fvwm weren’t quite what I needed.

So I went looking for a good terminal that supports 256 colors. There’s mrxvt and whatnot, but again the Probleme with these is that either utf-8 is missing or they’re in some other way ugly, dependency wise or whatever.

Read More

A critical look at Atom.io

I’m currently sitting at my Macbook Air 2013 writing this, which supposedly has a Haswell i7 ultramobile inside. According to my standards that’s a pretty decent amount of computing power.

Read More

launching firefox with text/html entry in mutt 1.5,21

I recently decided that I might want to see some html mails in a real browser instead of a w3m dump. For example when I need to click on the stupid reset password link, which is sent in the html only mail from easyjet.

Read More