Alright, it took me a few months to get to this, but I'm finally back and managed to tackle this problem.
Install bzip2 from source:
# Upload bzip2-1.0.6.tar.gz to ${SRC} $ cd ${SRC} $ tar -xzvf bzip2-1.0.6.tar.gz $ cd bzip2-1.0.6 $ export CFLAGS="-fPIC" $ make -f Makefile-libbz2_so $ make $ make install PREFIX=${STOW}/bzip2-1.0.6 $ cp libbz2.so.1.0.6 ${STOW}/bzip2-1.0.6/lib/ $ cd ${STOW}/bzip2-1.0.6/lib $ ln -s libbz2.so.1.0.6 libbz2.so.1.0 $ cd ${STOW} $ stow bzip2-1.0.6 $ source ${HOME}/.bash_profile $ bzip2 --version #=> bzip2, a block-soring file compressor. Version 1.0.6...
Install Python from source:
# Upload Python-2.7.3.tar.gz to ${SRC} $ cd ${SRC} $ tar -xzvf Python-2.7.3.tar.gz $ cd Python-2.7.3 $ export CLFAGS="-fPIC" $ export C_INCLUDE_PATH=${STOW}/../include $ export CPLUS_INCLUDE_PATH=${C_INCLUDE_PATH} $ export LIBRARY_PATH=${STOW}/../lib $ export LD_RUN_PATH=${LIBRARY_PATH} $ ./configure --enable-shared --prefix=${STOW}/Python-2.7.3 --libdir=${STOW}/../lib $ make $ make install prefix=${STOW}/Python-2.7.3 $ cd ${STOW} $ stow Python-2.7.3 $ source ${HOME}/.bash_profile $ python -V #=> Python 2.7.3 $ python -c "import bz2; print bz2.__doc__" #=> The python bz2 module provides...
Although node.js wasn't technically part of the question, it is what drove me to go through all of the above so I may as well include the last few commands to get node.js installed from source using a source install Python 2.7.3 & bzip2 1.0.6:
Install node.js from source:
# Upload node-v0.10.0.tar.gz to ${SRC} $ cd ${SRC} $ tar -xzvf node-v0.10.0.tar.gz $ cd node-v0.10.0 $ ./configure --prefix=${STOW}/node-v0.10.0 $ make $ make install prefix=${STOW}/node-v0.10.0 $ cd ${STOW} $ stow node-v0.10.0 $ source ${HOME}/.bash_profile $ node -v #=> v0.10.0