cd src


# pip can install itself! But first we need to ensure that the pip
# source directory in on the PYTHONPATH
export PYTHONPATH=`cd src && pwd`

# need to use --upgrade or --ignore-installed; Otherwise pip, which is
# importing itself, will think itself is already installed
#
# Install pip3 first so pip2 overwrites local/bin/pip
for vers in 3 2; do
    python${vers} -m pip install --verbose --no-index --ignore-installed \
            --no-build-isolation --isolated --root="$SAGE_DESTDIR" . || \
        sdh_die "Error building / installing pip${vers}"
done
