diff --git a/bin/steps/python b/bin/steps/python index 8d2384fa6ec5ae6b6bc7cceaf1fe6339add4b0d9..d36b3164cb76f1c4849cd5d6f32387810a7234ea 100755 --- a/bin/steps/python +++ b/bin/steps/python @@ -52,22 +52,22 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then bpwatch start prepare_environment + TMPTARDIR=$(mktemp -d) + trap "rm -rf $TMPTARDIR" RETURN + bpwatch start install_setuptools # Prepare it for the real world # puts-step "Installing Setuptools ($SETUPTOOLS_VERSION)" - cd $ROOT_DIR/vendor/ - tar zxf setuptools-$SETUPTOOLS_VERSION.tar.gz - cd $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION/ + tar zxf $ROOT_DIR/vendor/setuptools-$SETUPTOOLS_VERSION.tar.gz -C $TMPTARDIR + cd $TMPTARDIR/setuptools-$SETUPTOOLS_VERSION/ python setup.py install &> /dev/null cd $WORKING_DIR bpwatch stop install_setuptoools bpwatch start install_pip # puts-step "Installing Pip ($PIP_VERSION)" - - cd $ROOT_DIR/vendor/ - tar zxf pip-$PIP_VERSION.tar.gz - cd $ROOT_DIR/vendor/pip-$PIP_VERSION/ + tar zxf $ROOT_DIR/vendor/pip-$PIP_VERSION.tar.gz -C $TMPTARDIR + cd $TMPTARDIR/pip-$PIP_VERSION/ python setup.py install &> /dev/null cd $WORKING_DIR @@ -76,4 +76,4 @@ if [ "$FRESH_PYTHON" ] || [[ ! $(pip --version) == *$PIP_VERSION* ]]; then fi set -e -hash -r \ No newline at end of file +hash -r