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 prettier Terminal in OS-X Part 1 (awesome is awesome!)

Blog redesign...

As you can see I changed a lot on the site. It’s not yet completely working but it’s coming, so bear with me please…

Read More: Blog redesign...

awesome with gentoo-prefix

I just updated a whole bunch of ebuilds for gentoo-prefix you can find the overlay here.

Just clone it and put it somewhere in your $EPREFIX/usr/local/portage then add that folder to your make.conf

Read More: awesome with gentoo-prefix