Merge lp:~corey.bryant/charm-helpers/upgrade-pip into lp:charm-helpers

Proposed by Corey Bryant
Status: Merged
Merged at revision: 407
Proposed branch: lp:~corey.bryant/charm-helpers/upgrade-pip
Merge into: lp:charm-helpers
Diff against target: 19 lines (+5/-4)
1 file modified
charmhelpers/contrib/openstack/utils.py (+5/-4)
To merge this branch: bzr merge lp:~corey.bryant/charm-helpers/upgrade-pip
Reviewer Review Type Date Requested Status
Marco Ceppi Approve
Review via email: mp+264886@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Upstream OpenStack is starting to use requirements file syntax such as the following to target specific python versions:

Routes!=2.0,!=2.1,>=1.12.3;python_version=='2.7'

Older pip versions don't understand this and as a result won't install the requirement.

By default virtualenv's on trusty install a pretty old version of pip. This patch upgrades pip after creating the virtualenv.

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'charmhelpers/contrib/openstack/utils.py'
2--- charmhelpers/contrib/openstack/utils.py 2015-06-30 15:28:49 +0000
3+++ charmhelpers/contrib/openstack/utils.py 2015-07-15 17:28:40 +0000
4@@ -558,10 +558,11 @@
5
6 pip_create_virtualenv(os.path.join(parent_dir, 'venv'))
7
8- # Upgrade setuptools from default virtualenv version. The default version
9- # in trusty breaks update.py in global requirements master branch.
10- pip_install('setuptools', upgrade=True, proxy=http_proxy,
11- venv=os.path.join(parent_dir, 'venv'))
12+ # Upgrade setuptools and pip from default virtualenv versions. The default
13+ # versions in trusty break master OpenStack branch deployments.
14+ for p in ['pip', 'setuptools']:
15+ pip_install(p, upgrade=True, proxy=http_proxy,
16+ venv=os.path.join(parent_dir, 'venv'))
17
18 for p in projects['repositories']:
19 repo = p['repository']

Subscribers

People subscribed via source and target branches