Linux HOWTOs

About | Home | Search


ERROR: Slooooow dooooown... this page load was delayed.

HOWTO: pycairo
Description: cairo bindings for Python
Click here for ChangeLog
NOTE: I use GNU tar >= 1.13.25 so it's -j for .tar.bz2 files,
it's safe to assume that make, gcc, binutils, fileutils/coreutils, gawk, sed, and grep are prerequisites for almost everything


# pycairo 1.2.2
# =============
# Prerequisites:
# gawk
# sed
# grep
# Python >= 2.3
# pkg-config
# cairo >= 1.2.2
# GTK+-2.0 >= 2.2.0
# PyGTK-2.0 >= 2.2.0, < 2.7.0
# Numeric Python (optional)

cd
test -f installed/pycairo-1.2.2.tar.gz &&
 mv installed/pycairo-1.2.2.tar.gz .
test ! -f pycairo-1.2.2.tar.gz &&
 wget http://cairographics.org/releases/pycairo-1.2.2.tar.gz

# Verify tarball w/ md5sum:
echo "83a2e06d9fc3530753701d580a18087e  pycairo-1.2.2.tar.gz" | md5sum -c

mkdir -p -m 0700 src
cd src
find -maxdepth 1 -type d -name "pycairo-*" -exec rm -r {} \;
tar xzvf ~/pycairo-1.2.2.tar.gz
cd pycairo-1.2.2
test $UID = 0 && chown -R root:root .

# Use the prefix that Python is installed under
# (run 'python -c "import sys; print sys.prefix"')

./configure --prefix=/usr
make
su -c "make install"
cd
mkdir -p -m 0700 installed
rm -f installed/pycairo-*.tar.*
mv pycairo-1.2.2.tar.gz installed/


# If you ever want to uninstall pycairo, this should do it:
cd
su
test -d src/pycairo-* && ( cd src/pycairo-* ; make uninstall )
test -d /usr/include/pycairo && rm -r /usr/include/pycairo
test -d /usr/lib/python2.4/site-packages/cairo &&
 rm -r /usr/lib/python2.4/site-packages/cairo/
rm -f /usr/lib/pkgconfig/pycairo.pc
exit
find ~/src -maxdepth 1 -type d -name "pycairo-*" -exec rm -r {} \;
rm -f ~/installed/pycairo-*.tar.*

Back to the list


Last updated: Tue, 07 Aug 2018 12:06:17 -0400
Jason Englander <jason at englanders dot us>