set -eu set -o pipefail export PYTHON=/usr/local/c"$which_python"/bin/python export PYTHON_CONFIG=/usr/local/c"$which_python"/bin/python-config export PATH=/usr/local/c"$which_python"/bin:"$PATH" # Why waf wasn't including these libraries is beyond me. #export LDFLAGS="-Wl,-rpath -Wl,/usr/local/c$which_python/lib -lm -ldl -lutil" export LDFLAGS="-Wl,-rpath -Wl,/usr/local/c$which_python/lib" # /usr/local/c"$which_python"/bin/python ./waf configure --prefix /usr/local/c"$which_python" --libdir /usr/local/c"$which_python"/lib # /usr/local/c"$which_python"/bin/python ./waf build /usr/local/c"$which_python"/bin/python setup.py build