Unverified Commit 118f9fc9 by Feanil Patel Committed by GitHub

Merge pull request #4486 from edx/feanil/pin_pip

Pin pip in edxapp and in all IDAs that use the edx_django_service role.
parents fb624df3 2bbc46b1
......@@ -125,8 +125,11 @@ common_debian_pkgs:
old_python_debian_pkgs:
- "python2.7=2.7.10-0+{{ ansible_distribution_release }}1"
common_pip_version: '9.0.3'
common_pip_pkgs:
- pip==9.0.3
- pip=={{ common_pip_version }}
- setuptools==39.0.1
- virtualenv==15.2.0
- virtualenvwrapper==4.8.2
......
......@@ -61,6 +61,13 @@
- install
- install:system-requirements
- name: Pin pip to a specific version.
command: "{{ edx_django_service_venv_dir }}/bin/pip install pip=={{ common_pip_version }}"
become_user: "{{ edx_django_service_user }}"
tags:
- install
- install:system-requirements
# NOTE (CCB): Ideally we should use the pip Ansible command,
# but that doesn't seem to work with the Python 3.x virtualenv.
- name: install nodenv
......
......@@ -129,6 +129,16 @@
- install
- install:app-requirements
- name: Pin pip to a specific version.
command: "{{ edxapp_venv_dir }}/bin/pip install pip=={{ common_pip_version }}"
args:
chdir: "{{ edxapp_code_dir }}"
become_user: "{{ edxapp_user }}"
environment: "{{ edxapp_environment }}"
tags:
- install
- install:app-requirements
- name: Stat each Python requirements file to ensure it exists
stat:
path: "{{ item }}"
......
......@@ -115,17 +115,7 @@ apt-get update -y
apt-get install -y python2.7 python2.7-dev python-pip python-apt python-yaml python-jinja2 build-essential sudo git-core libmysqlclient-dev libffi-dev libssl-dev
# Workaround for a 16.04 bug, need to upgrade to latest and then
# potentially downgrade to the preferred version.
if [[ "xenial" = "${SHORT_DIST}" ]]; then
#apt-get install -y python2.7 python2.7-dev python-pip python-apt python-yaml python-jinja2
pip install --upgrade pip
pip install --upgrade pip=="${PIP_VERSION}"
#apt-get install -y build-essential sudo git-core libmysqlclient-dev
else
#apt-get install -y python2.7 python2.7-dev python-pip python-apt python-yaml python-jinja2 build-essential sudo git-core libmysqlclient-dev
pip install --upgrade pip=="${PIP_VERSION}"
fi
pip install --upgrade pip=="${PIP_VERSION}"
# pip moves to /usr/local/bin when upgraded
PATH=/usr/local/bin:${PATH}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment