Skip to content

Commit

Permalink
fix(centos6): install correct pip version
Browse files Browse the repository at this point in the history
closes #18
  • Loading branch information
javierbertoli committed Nov 27, 2019
1 parent 4676583 commit 0b05d8f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ env:
- DN=centos DV=7 PI=yum SV=2019.2 SIM=stable PV=3 EP="python3 python3-pip python3-devel openssl-devel swig gcc-g++ zeromq zeromq-devel"
- DN=centos DV=7 PI=yum SV=2019.2 SIM=stable PV=2 EP="python2-pip"
- DN=centos DV=7 PI=yum SV=2018.3 SIM=stable PV=2 EP="python2-pip"
- DN=centos DV=6 PI=yum SV=2018.3 SIM=stable PV=2 EP="python-pip"
- DN=centos DV=6 PI=yum SV=2017.7 SIM=stable PV=2 EP="python-pip"
- DN=centos DV=6 PI=yum SV=2018.3 SIM=stable PV=2 EP="python27-pip"
- DN=centos DV=6 PI=yum SV=2017.7 SIM=stable PV=2 EP="python27-pip"

# DEBIAN
- DN=debian DV=10 PI=apt SV=master SIM=git PV=3 EP="python3-apt python3-pip"
Expand Down
9 changes: 7 additions & 2 deletions Dockerfile.yum
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ ARG EXTRA_PACKAGES=""

ARG PKGS="udev git net-tools sudo curl openssh-server openssh-clients which $EXTRA_PACKAGES"

# Centos 7 and 6 requires EPEL repo before being able to install python2-pip
RUN if [ "${DISTRO_NAME}" = "centos" ]; \
# Centos 7 requires EPEL repo before being able to install python2-pip
RUN if [ "${DISTRO_NAME}" = "centos" -a "${DISTRO_NAME}" = "7" ]; \
then yum -y install epel-release; \
fi
RUN yum -y update && yum -y install ${PKGS}
Expand All @@ -25,6 +25,11 @@ RUN curl -L https://raw.githubusercontent.com/saltstack/salt-bootstrap/develop/b
sed "s/python34/python3/g" | \
sudo sh -s -- -XUdfP -x python$PYTHON_VERSION $SALT_INSTALL_METHOD $SALT_VERSION

# Centos 6 installs python27-pip from the salt repo
RUN if [ "${DISTRO_NAME}" = "centos" -a "${DISTRO_VERSION}" = "6" ]; \
then yum -y update && yum -y install $EXTRA_PACKAGES; \
ln -s /usr/bin/pip2.7 /usr/bin/pip; \
fi
RUN rm -rf /var/cache/{salt,yum} \
&& (find / -name "*pyc" ; find / -name "__pycache__") |grep -v /proc | xargs rm -rf

0 comments on commit 0b05d8f

Please sign in to comment.