Bug 1433067

Summary: System pip is used instead of collection one
Product: Red Hat Software Collections Reporter: Branislav Náter <bnater>
Component: python27-containerAssignee: Python Maintainers <python-maint>
Status: CLOSED NOTABUG QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: python27CC: cstratak, hhorak, lzachar, torsava
Target Milestone: ---   
Target Release: 2.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-21 10:00:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1344674    

Description Branislav Náter 2017-03-16 17:14:31 UTC
Description of problem:
python27-python-pip that is under test currently (rhscl-2.4) contains python27-python-pip-8.1.2-1.el7. This version should be used when invoking pip, but system one is used instead. See bellow.

Version-Release number of selected component (if applicable):
"name": "rhscl-beta/python-27-rhel7",
"release": "17"

How reproducible:
# s2i build git://github.com/mnagy/stress_test brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhscl-beta/python-27-rhel7 python-sample-app  --context-dir=sti-python/test-app

# docker run -ti <image ID> bash
(app-root)rpm -q python27-python-pip
python27-python-pip-8.1.2-1.el7.noarch
(app-root)pip -V
pip 7.1.0 from /opt/app-root/lib/python2.7/site-packages (python 2.7)
(app-root)declare -p PATH
declare -x PATH="/opt/app-root/bin:/opt/rh/python27/root/usr/bin:/opt/app-root/src/.local/bin/:/opt/app-root/src/bin:/opt/app-root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"



Actual results:
system pip (7.1.0) is used

Expected results:
collection pip (8.1.2) is used

Comment 1 Tomas Orsava 2017-03-17 09:37:18 UTC
This is caused by the activation of virtualenv which ignores installed versions of pip, setuptools, wheel and argparse and instead bundles it's own which it then installs into the virtual environment.

Comment 2 Honza Horak 2017-03-17 17:05:55 UTC
This is actually this PR:
https://github.com/sclorg/s2i-python-container/pull/159

There were reasons to use virtualenv, so unless there are some known issues with current solution, I'd say this is more a feature than a bug.