Unverified Commit cccdf6c1 authored by Chris R's avatar Chris R Committed by GitHub
Browse files

Merge pull request #68 from obenn/patch-1

Correct pip configuration location for linux/py3

PIP now obtains its configuration from ~/.pip/pip.conf and not ~/pip/pip.conf

Updated references in entrypoint.sh.

* Add new config location to python2 as well
parents eda0426b 7bfbaf47
Loading
Loading
Loading
Loading

linux/py2/entrypoint.sh

100755 → 100644
+6 −6
Original line number Diff line number Diff line
@@ -19,14 +19,14 @@ if [[ "$PYPI_URL" != "https://pypi.python.org/" ]] || \
   [[ "$PYPI_INDEX_URL" != "https://pypi.python.org/simple" ]]; then
    # the funky looking regexp just extracts the hostname, excluding port
    # to be used as a trusted-host.
    mkdir -p /root/pip
    echo "[global]" > /root/pip/pip.conf
    echo "index = $PYPI_URL" >> /root/pip/pip.conf
    echo "index-url = $PYPI_INDEX_URL" >> /root/pip/pip.conf
    echo "trusted-host = $(echo $PYPI_URL | perl -pe 's|^.*?://(.*?)(:.*?)?/.*$|$1|')" >> /root/pip/pip.conf
    mkdir -p /root/.pip
    echo "[global]" > /root/.pip/pip.conf
    echo "index = $PYPI_URL" >> /root/.pip/pip.conf
    echo "index-url = $PYPI_INDEX_URL" >> /root/.pip/pip.conf
    echo "trusted-host = $(echo $PYPI_URL | perl -pe 's|^.*?://(.*?)(:.*?)?/.*$|$1|')" >> /root/.pip/pip.conf

    echo "Using custom pip.conf: "
    cat /root/pip/pip.conf
    cat /root/.pip/pip.conf
fi

cd $WORKDIR

linux/py3/entrypoint.sh

100755 → 100644
+6 −6
Original line number Diff line number Diff line
@@ -19,14 +19,14 @@ if [[ "$PYPI_URL" != "https://pypi.python.org/" ]] || \
   [[ "$PYPI_INDEX_URL" != "https://pypi.python.org/simple" ]]; then
    # the funky looking regexp just extracts the hostname, excluding port
    # to be used as a trusted-host.
    mkdir -p /root/pip
    echo "[global]" > /root/pip/pip.conf
    echo "index = $PYPI_URL" >> /root/pip/pip.conf
    echo "index-url = $PYPI_INDEX_URL" >> /root/pip/pip.conf
    echo "trusted-host = $(echo $PYPI_URL | perl -pe 's|^.*?://(.*?)(:.*?)?/.*$|$1|')" >> /root/pip/pip.conf
    mkdir -p /root/.pip
    echo "[global]" > /root/.pip/pip.conf
    echo "index = $PYPI_URL" >> /root/.pip/pip.conf
    echo "index-url = $PYPI_INDEX_URL" >> /root/.pip/pip.conf
    echo "trusted-host = $(echo $PYPI_URL | perl -pe 's|^.*?://(.*?)(:.*?)?/.*$|$1|')" >> /root/.pip/pip.conf

    echo "Using custom pip.conf: "
    cat /root/pip/pip.conf
    cat /root/.pip/pip.conf
fi

cd $WORKDIR