centos7-rpms-py2 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. FROM centos:7
  2. ARG repo=https://pagure.io/pagure.git
  3. ARG branch=master
  4. ENV REPO=$repo
  5. ENV BRANCH=$branch
  6. RUN yum -y install \
  7. epel-release
  8. ADD ./fedora-infra-tags.repo /etc/yum.repos.d/infra-tags.repo
  9. ADD ./fedora-infra-tags-stg.repo /etc/yum.repos.d/infra-tags-stg.repo
  10. RUN yum -y install \
  11. yum-utils \
  12. rpm-build \
  13. python-setuptools \
  14. python-coverage \
  15. python-nose \
  16. python-mock \
  17. python-docutils \
  18. python-enum \
  19. python-flask \
  20. python-flake8 \
  21. redis \
  22. which \
  23. git \
  24. repoSpanner \
  25. repoSpanner-bridge
  26. RUN cd / \
  27. && git clone -b $BRANCH $REPO \
  28. && chmod +x /pagure/dev/containers/runtests_py2.sh
  29. # Install all the requirements from the spec file and replace the macro
  30. # %{python_pkgversion} by empty string which thus installs all the py2
  31. # version of the dependencies.
  32. RUN cd /pagure && \
  33. yum install --enablerepo=epel-testing -y \
  34. `rpmspec -q --requires /pagure/files/pagure.spec | \
  35. sed -e "s|%{python_pkgversion}||"` && \
  36. yum clean all && \
  37. localedef -i en_US -f UTF-8 en_US.UTF-8
  38. # The old version of setuptools in CentOS7 does not support restrictions on
  39. # the requirements file, so drop them
  40. RUN \
  41. sed -i -e "s|;python_version<\"3.4\"||" /pagure/requirements.txt && \
  42. sed -i -e "s|;python_version<=\"2.7\"||" /pagure/requirements.txt && \
  43. sed -i -e "s|python3-openid;python_version>=\"3.0\"||" \
  44. /pagure/requirements.txt && \
  45. cd /pagure && python setup.py build
  46. WORKDIR /pagure
  47. ENTRYPOINT ["/pagure/dev/containers/runtests_py2.sh"]
  48. CMD []