<commit_before>if [ $OS = "CentOS" ]; then
	yum -y install bzip2-devel gdbm-devel
else
	aptitude -y install libbz2-dev libgdbm-dev
fi

cd /home/matt/src
wget http://python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tar.bz2
tar xjvf Python-$PYTHON_VER.tar.bz2
cd Python-$PYTHON_VER
./configure --prefix=/home/matt/src/python$PYTHON_VER --with-threads --enable-shared
make -j4
make install #Not dangerous. Peep the prefix.
touch /home/matt/.bash_profile
chown matt:matt /home/matt/.bash_profile
echo "alias python='/home/matt/src/python$PYTHON_VER/bin/python'" >> /home/matt/.bash_profile
echo "alias python$PYTHON_SHORT_VER='/home/matt/src/python$PYTHON_VER/bin/python'" >> /home/matt/.bash_profile

#TODO: Figure out why you're appending instead of prepending.
echo "PATH=$PATH:/home/matt/src/python$PYTHON_VER/bin" >> /home/matt/.bash_profile

echo "/home/matt/src/python$PYTHON_VER/lib" > /etc/ld.so.conf.d/python$PYTHON_VER.conf
ldconfig

#TODO: What's this for again? Mercurial maybe?
echo "PYTHONPATH=/home/matt/src/python$PYTHON_VER/lib/python$PYTHON_VER/" >> /home/matt/.bash_profile
. /home/matt/.bash_profile # So I have access to those aliases.

#TODO: Install Python 3 when folks are actually using it.
#cd /home/matt/src
#wget http://www.python.org/ftp/python/$PYTHON3_SHORT_VER/Python-$PYTHON3_VER.tar.bz2
#tar xjvf Python-$PYTHON3_VER.tar.bz2
#cd Python-$PYTHON3_VER
#./configure --prefix=/home/matt/src/python$PYTHON3_VER --with-threads --enable-shared
#make -j4
#make install
#echo "alias python3='/home/matt/src/python$PYTHON3_VER/bin/python3'" >> ~/.bash_profile
#echo "alias python$PYTHON3_SHORT_VER='/home/matt/src/python$PYTHON3_VER/bin/python3'" >> ~/.bash_profile
#echo "PATH=$PATH:/home/matt/src/python$PYTHON3_VER/bin" >> ~/.bash_profile
#echo "/home/matt/src/python$PYTHON3_VER/lib" >> /etc/ld.so.conf.d/python$PYTHON3_VER.conf
#ldconfig
#echo "PYTHONPATH=/home/matt/src/python$PYTHON_VER/lib/python$PYTHON_VER/:$PYTHONPATH" >> ~/.bash_profile

cd /home/matt/src
curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py

wget http://mercurial.selenic.com/release/mercurial-$HG_VER.tar.gz 
tar xzvf mercurial-$HG_VER.tar.gz
cd mercurial-$HG_VER
checkinstall make install-bin PYTHON=/home/matt/src/python$PYTHON_VER/bin/python PREFIX=/home/matt/src/python$PYTHON_VER

curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
python get-pip.py

#Pygments, fabric, virtualenv, docutils.
<commit_msg>Debugging Natty + Python zlib issues.<commit_after>if [ $OS = "CentOS" ]; then
	yum -y install bzip2-devel gdbm-devel
else
	aptitude -y install libbz2-dev libgdbm-dev
fi

cd /home/matt/src
wget http://python.org/ftp/python/$PYTHON_VER/Python-$PYTHON_VER.tar.bz2
tar xjvf Python-$PYTHON_VER.tar.bz2
cd Python-$PYTHON_VER

#zlib issues on Ubuntu Natty, this may be temporary.
rm -r Modules/zlib

./configure --prefix=/home/matt/src/python$PYTHON_VER --with-threads --enable-shared
make -j4
make install #Not dangerous. Peep the prefix.
touch /home/matt/.bash_profile
chown matt:matt /home/matt/.bash_profile
echo "alias python='/home/matt/src/python$PYTHON_VER/bin/python'" >> /home/matt/.bash_profile
echo "alias python$PYTHON_SHORT_VER='/home/matt/src/python$PYTHON_VER/bin/python'" >> /home/matt/.bash_profile

#TODO: Figure out why you're appending instead of prepending.
echo "PATH=$PATH:/home/matt/src/python$PYTHON_VER/bin" >> /home/matt/.bash_profile

echo "/home/matt/src/python$PYTHON_VER/lib" > /etc/ld.so.conf.d/python$PYTHON_VER.conf
ldconfig

#TODO: What's this for again? Mercurial maybe?
echo "PYTHONPATH=/home/matt/src/python$PYTHON_VER/lib/python$PYTHON_VER/" >> /home/matt/.bash_profile
. /home/matt/.bash_profile # So I have access to those aliases.

#TODO: Install Python 3 when folks are actually using it.
#cd /home/matt/src
#wget http://www.python.org/ftp/python/$PYTHON3_SHORT_VER/Python-$PYTHON3_VER.tar.bz2
#tar xjvf Python-$PYTHON3_VER.tar.bz2
#cd Python-$PYTHON3_VER
#./configure --prefix=/home/matt/src/python$PYTHON3_VER --with-threads --enable-shared
#make -j4
#make install
#echo "alias python3='/home/matt/src/python$PYTHON3_VER/bin/python3'" >> ~/.bash_profile
#echo "alias python$PYTHON3_SHORT_VER='/home/matt/src/python$PYTHON3_VER/bin/python3'" >> ~/.bash_profile
#echo "PATH=$PATH:/home/matt/src/python$PYTHON3_VER/bin" >> ~/.bash_profile
#echo "/home/matt/src/python$PYTHON3_VER/lib" >> /etc/ld.so.conf.d/python$PYTHON3_VER.conf
#ldconfig
#echo "PYTHONPATH=/home/matt/src/python$PYTHON_VER/lib/python$PYTHON_VER/:$PYTHONPATH" >> ~/.bash_profile

cd /home/matt/src
curl -O http://python-distribute.org/distribute_setup.py
python distribute_setup.py

wget http://mercurial.selenic.com/release/mercurial-$HG_VER.tar.gz 
tar xzvf mercurial-$HG_VER.tar.gz
cd mercurial-$HG_VER
checkinstall make install-bin PYTHON=/home/matt/src/python$PYTHON_VER/bin/python PREFIX=/home/matt/src/python$PYTHON_VER

curl -O https://github.com/pypa/pip/raw/master/contrib/get-pip.py
python get-pip.py

#Pygments, fabric, virtualenv, docutils.

{'fraction_non_alphanumeric': 0.15284974093264247, 'fraction_numerical': 0.009166998804304504, 'mean_word_length': 4.809027777777778, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 41, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3970486', 'n_tokens_mistral': 2096, 'n_tokens_neox': 2000, 'n_words': 332}