f31-rpms-py3 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. FROM fedora:31
  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. redis \
  15. which \
  16. git
  17. RUN cd / \
  18. && GIT_TRACE=1 GIT_CURL_VERBOSE=1 git clone -b $BRANCH $REPO \
  19. && chmod +x /pagure/dev/containers/runtests_py3.sh \
  20. && sed -i -e 's|\["alembic",|\["alembic-3",|' /pagure/tests/test_alembic.py
  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 []