Install Pylint 0.19.0 on Ubuntu 9.10 (Karmic Koala)

Ubuntu 9.10 (Karmic Koala) provides version 0.18 of Pylint by default. Unfortunately, this version of Pylint cannot be used to scan code that includes any module from PyQt4. The problem is described in this post and has been fixed in the latest version of Pylint (0.19.0). The next release of Ubuntu (10.04 Lucid Lynx) will include Pylint 0.19.x but I have not found any backport of this package to Ubuntu 9.10. However, it is pretty easy to install it in your local home directory using the script listed below:

#! /bin/bash
#
# Do all our work in a temporary directory.
#
ORIGDIR=$PWD
TMPDIR=`/bin/mktemp -d`
if [ ! -d "$TMPDIR" ]
then
    exit 0
fi
cd $TMPDIR || exit 0
#
# Get the three packages that are needed to install PyLint locally.
#
wget http://ftp.logilab.org/pub/pylint/pylint-0.19.0.tar.gz || exit 0
wget http://ftp.logilab.org/pub/astng/logilab-astng-0.19.3.tar.gz || exit 0
wget http://ftp.logilab.org/pub/common/logilab-common-0.48.0.tar.gz || exit 0
#
# Install each package individually in the user's local installation
# folder.
#
for i in *.tar.gz
do
    PKGDIR=${i%.tar.gz}
    tar xvf $i
    (cd $PKGDIR && python setup.py install --user)
    yes | /bin/rm -r $PKGDIR
    /bin/rm $i
done
#
# Remove the temporary directory.
#
cd $ORIGDIR || exit 0
/bin/rm -r $TMPDIR
This entry was posted in Linux, Python and tagged , , . Bookmark the permalink.

One Response to Install Pylint 0.19.0 on Ubuntu 9.10 (Karmic Koala)

  1. Pingback: DUANE

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>