Linux HOWTOs

About | Home | Search


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

HOWTO: pyqt
Description: Python bindings for Qt
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


# PyQt
# ====
# Before you run through this, or anything else related to Qt, make sure
# that you have QTDIR defined (usually to /usr/lib/qt) and that you have Qt's
# bin directory (/usr/lib/qt/bin) set in your PATH.

mkdir -p -m 0700 ~/installed/pyqt ~/src/pyqt


# sip 4.4.5
# =========
# If you use Python 2.3 or 2.4, this version should be OK, if you use Python
# 2.5, try the snapshot below.

# Prerequisites:
# Python >= 2.3
# Qt

cd
test -f installed/pyqt/sip-4.4.5.tar.gz &&
 mv installed/pyqt/sip-4.4.5.tar.gz .
test ! -f sip-4.4.5.tar.gz &&
 wget http://www.riverbankcomputing.com/Downloads/sip4/sip-4.4.5.tar.gz
mkdir -p -m 0700 src/pyqt
cd src/pyqt
find -maxdepth 1 -type d -name "sip-*" -exec rm -r {} \;
tar xzvf ~/sip-4.4.5.tar.gz
cd sip-4.4.5
test $UID = 0 && chown -R root:root .

# You used to have to pass "-l qt-mt" to configure.py, if you have the
# threaded (-mt) Qt libraries, but that is handled automatically now.

python configure.py
make
su -c "make install"
cd
rm -f installed/pyqt/sip-*.tar.*
mv sip-4.4.5.tar.gz installed/pyqt/


# sip-snapshot-20061022
# =====================
# Use this snapshot version if you use Python 2.5

# Prerequisites:
# Python >= 2.3
# Qt

cd
test -f installed/pyqt/sip-snapshot-20061022.tar.gz &&
 mv installed/pyqt/sip-snapshot-20061022.tar.gz .
test ! -f sip-snapshot-20061022.tar.gz &&
 wget http://www.riverbankcomputing.com/Downloads/Snapshots/sip4/\
sip-snapshot-20061022.tar.gz
mkdir -p -m 0700 src/pyqt
cd src/pyqt
find -maxdepth 1 -type d -name "sip-*" -exec rm -r {} \;
tar xzvf ~/sip-snapshot-20061022.tar.gz
cd sip-snapshot-20061022
test $UID = 0 && chown -R root:root .

# You used to have to pass "-l qt-mt" to configure.py, if you have the
# threaded (-mt) Qt libraries, but that is handled automatically now.

python configure.py
make
su -c "make install"
cd
rm -f installed/pyqt/sip-*.tar.*
mv sip-snapshot-20061022.tar.gz installed/pyqt/


# QScintilla 1.6 1.65
# ===================
cd
test -f installed/pyqt/qscintilla-1.65-gpl-1.6.tar.gz &&
 mv installed/pyqt/qscintilla-1.65-gpl-1.6.tar.gz .
test ! -f qscintilla-1.65-gpl-1.6.tar.gz &&
 wget http://www.riverbankcomputing.com/Downloads/QScintilla1/\
qscintilla-1.65-gpl-1.6.tar.gz
mkdir -p -m 0700 src/pyqt
cd src/pyqt
find -maxdepth 1 -type d -name "qscintilla-*-gpl-*" -exec rm -r {} \;
tar xzvf ~/qscintilla-1.65-gpl-1.6.tar.gz
cd qscintilla-1.65-gpl-1.6
test $UID = 0 && chown -R root:root .

# If your Qt was built without thread support, open up qt/qscintilla.pro
# with a text editor and remove the word thread from the CONFIG line

# Become root to build and install it
su

cd qt
$QTDIR/bin/qmake qscintilla.pro
rm -f $QTDIR/lib/libqscintilla.so.*
make
cp qextscintilla*.h $QTDIR/include/
cp qscintilla*.qm $QTDIR/translations/
chown -R $USER .

# Become yourself again
exit

cd
rm -f installed/pyqt/qscintilla-*-gpl-*.tar.*
mv qscintilla-1.65-gpl-1.6.tar.gz installed/pyqt/


# PyQt 3.16
# =========
# If you installed the sip snapshot version above, skip down to the PyQt
# snapshot below.

# Prerequisites (beyond those listed above):
# sip
# QScintilla 1.x (optional)

# There is a PyQt 4.x too, but that is for Qt 4.x, which I'm not using yet

cd
test -f installed/pyqt/PyQt-x11-gpl-3.16.tar.gz &&
 mv installed/pyqt/PyQt-x11-gpl-3.16.tar.gz .
test ! -f PyQt-x11-gpl-3.16.tar.gz &&
 wget http://www.riverbankcomputing.com/Downloads/PyQt3/GPL/\
PyQt-x11-gpl-3.16.tar.gz
mkdir -p -m 0700 src/pyqt
cd src/pyqt
find -maxdepth 1 -type d -name "PyQt-x11-gpl-*" -exec rm -r {} \;
tar xzvf ~/PyQt-x11-gpl-3.16.tar.gz
cd PyQt-x11-gpl-3.16
test $UID = 0 && chown -R root:root .

# Don't run this if you don't accept the license:
echo "yes" | python configure.py
make
su -c "make install"
cd
rm -f installed/pyqt/PyQt-x11-gpl-*.tar.*
mv PyQt-x11-gpl-3.16.tar.gz installed/pyqt/


# PyQt snapshot-20061021
# ======================
# Prerequisites (beyond those listed above):
# sip >= 4.4
# QScintilla 1.x (optional)

# There is a PyQt 4.x too, but that is for Qt 4.x, which I'm not using yet

cd
test -f installed/pyqt/PyQt-x11-gpl-3-snapshot-20061021.tar.gz &&
 mv installed/pyqt/PyQt-x11-gpl-3-snapshot-20061021.tar.gz .
test ! -f PyQt-x11-gpl-3-snapshot-20061021.tar.gz &&
 wget http://www.riverbankcomputing.com/Downloads/Snapshots/PyQt3/\
PyQt-x11-gpl-3-snapshot-20061021.tar.gz
mkdir -p -m 0700 src/pyqt
cd src/pyqt
find -maxdepth 1 -type d -name "PyQt-x11-gpl-*" -exec rm -r {} \;
tar xzvf ~/PyQt-x11-gpl-3-snapshot-20061021.tar.gz
cd PyQt-x11-gpl-3-snapshot-20061021
test $UID = 0 && chown -R root:root .

# Don't run this if you don't accept the license:
echo "yes" | python configure.py
make
su -c "make install"
cd
rm -f installed/pyqt/PyQt-x11-gpl-*.tar.*
mv PyQt-x11-gpl-3-snapshot-20061021.tar.gz installed/pyqt/

Back to the list


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