fedora-rpms-py3 1.1 KB

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