Building Python 2.7.3 on RHEL6

bug 804865 recently introduced the requirement to use Python 2.7 when building Firefox Nightly (Firefox 21). Since only Python 2.6 is available on Redhat Enterprise Linux 6 (RHEL6) you will need to build Python. A working version can be built by:

cd ~/Downloads
sudo yum install bzip2-devel sqlite-devel ncurses-devel openssl-devel readline-devel tkinter tk-devel
curl -O http://www.python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2
if ! md5sum Python-2.7.3.tar.bz2 | grep c57477edd6d18bd9eeca2f21add73919; then
    echo "Failed md5sum check"
else
    tar xjvf Python-2.7.3.tar.bz2 && \
    cd Python-2.7.3 && \
    ./configure && \
    make && \
    sudo make altinstall
fi

This will produce a working version of Python that can be used to build Firefox Nightly though the following modules will not be built.

  • _bsddb
  • bsddb185
  • dbm
  • gdbm
  • sunaudiodev

See Python 2.7.3 Release for more details.