fedora-rpms-py3 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. FROM quay.io/fedora/fedora:32
  2. ARG repo=https://pagure.io/pagure.git
  3. ARG branch=master
  4. ENV REPO=$repo
  5. ENV BRANCH=$branch
  6. RUN dnf -y --enablerepo=updates-testing install \
  7. python3-setuptools \
  8. python3-coverage \
  9. python3-nose \
  10. python3-mock \
  11. python3-docutils \
  12. python3-black \
  13. python3-flake8 \
  14. python3-pytest-xdist \
  15. python3-cchardet \
  16. redis \
  17. which \
  18. git
  19. RUN cd / \
  20. && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \
  21. && chmod +x /pagure/dev/containers/runtests_py3.sh
  22. # Install all the requirements from the spec file and replace the macro
  23. # %{python_pkgversion} by '3' which thus installs all the py3 version of
  24. # the dependencies.
  25. RUN sed -i "/Requires: python%{python_pkgversion}-enum34/d" /pagure/files/pagure.spec && \
  26. dnf install -y --enablerepo=updates-testing `grep "Requires:" /pagure/files/pagure.spec | \
  27. awk '{split($0, a, " "); print a[2]}' |grep -v "%{name}" | \
  28. sed -e "s|%{python_pkgversion}|3|"` && \
  29. dnf clean all && \
  30. cd /pagure && \
  31. python3 setup.py build
  32. WORKDIR /pagure
  33. ENTRYPOINT ["/pagure/dev/containers/runtests_py3.sh"]
  34. CMD []