Blame dev/containers/centos7-rpms-py2

Pierre-Yves Chibon 921afa
FROM centos:7
Pierre-Yves Chibon 921afa
Karsten Hopp 0d4020
ARG repo=https://pagure.io/pagure.git
Karsten Hopp 0d4020
ARG branch=master
Karsten Hopp 099860
Karsten Hopp 099860
ENV REPO=$repo
Karsten Hopp 099860
ENV BRANCH=$branch
Karsten Hopp 099860
Pierre-Yves Chibon 921afa
RUN yum -y install \
Pierre-Yves Chibon 8d1732
    epel-release
Pierre-Yves Chibon 8d1732
Pierre-Yves Chibon 479e0a
ADD ./fedora-infra-tags.repo /etc/yum.repos.d/infra-tags.repo
Pierre-Yves Chibon d1ba61
ADD ./fedora-infra-tags-stg.repo /etc/yum.repos.d/infra-tags-stg.repo
Pierre-Yves Chibon 479e0a
Pierre-Yves Chibon 8d1732
RUN yum -y install \
Pierre-Yves Chibon 921afa
    yum-utils \
Pierre-Yves Chibon 921afa
    rpm-build \
Pierre-Yves Chibon 921afa
    python-setuptools \
Pierre-Yves Chibon 921afa
    python-coverage \
Pierre-Yves Chibon 921afa
    python-nose \
Pierre-Yves Chibon 8d1732
    python-mock \
Pierre-Yves Chibon 921afa
    python-docutils \
Pierre-Yves Chibon 921afa
    python-enum \
Pierre-Yves Chibon 921afa
    python-flask \
Pierre-Yves Chibon 479e0a
    python-flake8 \
Pierre-Yves Chibon 921afa
    redis \
Pierre-Yves Chibon 479e0a
    which \
Pierre-Yves Chibon 479e0a
    git \
Pierre-Yves Chibon 479e0a
    repoSpanner \
Pierre-Yves Chibon 479e0a
    repoSpanner-bridge
Pierre-Yves Chibon 479e0a
Pierre-Yves Chibon 479e0a
RUN cd / \
Julen Landa Alustiza 698eb4
    && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \
Pierre-Yves Chibon 479e0a
    && chmod +x /pagure/dev/containers/runtests_py2.sh
Pierre-Yves Chibon 921afa
Pierre-Yves Chibon 479e0a
# Install all the requirements from the spec file and replace the macro
Pierre-Yves Chibon 479e0a
# %{python_pkgversion} by empty string which thus installs all the py2
Pierre-Yves Chibon 479e0a
# version of the dependencies.
Pierre-Yves Chibon 921afa
RUN cd /pagure && \
Pierre-Yves Chibon 8d1732
    yum install --enablerepo=epel-testing -y \
Pierre-Yves Chibon 479e0a
    `rpmspec -q --requires /pagure/files/pagure.spec | \
Pierre-Yves Chibon 921afa
    sed -e "s|%{python_pkgversion}||"` && \
Pierre-Yves Chibon 8d1732
    yum clean all && \
Pierre-Yves Chibon 921afa
    localedef -i en_US -f UTF-8 en_US.UTF-8
Pierre-Yves Chibon 921afa
Pierre-Yves Chibon 479e0a
# The old version of setuptools in CentOS7 does not support restrictions on
Pierre-Yves Chibon 479e0a
# the requirements file, so drop them
Pierre-Yves Chibon 8d1732
RUN \
Pierre-Yves Chibon 8d1732
    sed -i -e "s|;python_version<\"3.4\"||" /pagure/requirements.txt && \
Pierre-Yves Chibon 8d1732
    sed -i -e "s|;python_version<=\"2.7\"||" /pagure/requirements.txt && \
Pierre-Yves Chibon 8d1732
    sed -i -e "s|python3-openid;python_version>=\"3.0\"||" \
Pierre-Yves Chibon 8d1732
       /pagure/requirements.txt && \
Pierre-Yves Chibon 8d1732
    cd /pagure && python setup.py build
Pierre-Yves Chibon 8d1732
Pierre-Yves Chibon 921afa
Pierre-Yves Chibon 921afa
WORKDIR /pagure
Pierre-Yves Chibon 479e0a
ENTRYPOINT ["/pagure/dev/containers/runtests_py2.sh"]
Pierre-Yves Chibon 921afa
CMD []