centos7-rpms-py2 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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_TRACE=1 GIT_CURL_VERBOSE=1 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. sed -i "/^email_validator.*/d" /pagure/requirements.txt && \
  46. cd /pagure && python setup.py build
  47. WORKDIR /pagure
  48. ENTRYPOINT ["/pagure/dev/containers/runtests_py2.sh"]
  49. CMD []