Skip to content

Commit

Permalink
Display custom PIP_INDEX_URL info
Browse files Browse the repository at this point in the history
The current PIP version (1.5.6) in Python 3.3 and 3.4 doesn't display
the repository link for non-PyPi during "pip install" step in the log
which may make debugging difficult.

The fix is added to display the non-PyPi repository link that is set
by users via PIP_INDEX_URL env var.

Bug 1357794
Link https://bugzilla.redhat.com/show_bug.cgi?id=1357794

Signed-off-by: Vu Dinh <vdinh@redhat.com>
  • Loading branch information
dinhxuanvu committed Aug 19, 2016
1 parent e761571 commit 46c95d1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion 3.3/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ echo "---> Installing application source ..."
mv /tmp/src/* ./

if [[ -f requirements.txt ]]; then
echo "---> Installing dependencies ..."
if [ -n "$PIP_INDEX_URL" ]; then
echo "---> Installing dependencies via $PIP_INDEX_URL ..."
else
echo "---> Installing dependencies ..."
fi
pip install --user -r requirements.txt
fi

Expand Down
6 changes: 5 additions & 1 deletion 3.4/s2i/bin/assemble
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,11 @@ if [[ -f requirements.txt ]]; then
fi

if [[ -f setup.py ]]; then
echo "---> Installing application ..."
if [ -n "$PIP_INDEX_URL" ]; then
echo "---> Installing dependencies via $PIP_INDEX_URL ..."
else
echo "---> Installing dependencies ..."
fi
python setup.py develop --user
fi

Expand Down

0 comments on commit 46c95d1

Please sign in to comment.