#54 Don't use sphinxcontrib-websupport to build docs in RHEL
Merged 11 months ago by churchyard. Opened 11 months ago by ksurma.
rpms/ ksurma/python-sphinx docs  into  rawhide

file modified
+11 -11
@@ -1,25 +1,22 @@ 

- # When bootstrapping sphinx, we don't yet have sphinxcontrib-websupport

+ # When bootstrapping sphinx in Fedora, we don't yet have sphinxcontrib-websupport

  # Without it we have warnings in docs, but it's not a hard dependency

- %bcond_without websupport

+ # We don't want to support sphinxcontrib-websupport in RHEL, hence disabling the dependency

+ %bcond websupport %{undefined rhel}

  # Also, we don't have all the tests requirements

- %bcond_without tests

+ %bcond tests 1

  

  # Unset -s on python shebang to allow RPM-installed sphinx to be used

  # with user-installed modules (#1903763)

  %undefine _py3_shebang_s

  

  # No internet in Koji

- %bcond_with internet

+ %bcond internet 0

  

- %if 0%{?rhel} > 7

  # Build without BuildRequires ImageMagick, to skip imgconverter tests

- %bcond_with imagemagick_tests

- %else

- %bcond_without imagemagick_tests

- %endif

+ %bcond imagemagick_tests %{undefined rhel}

  

  # During texlive updates, sometimes the latex environment is unstable

- %bcond_without latex_tests

+ %bcond latex_tests 1

  

  %global upstream_name Sphinx

  
@@ -28,7 +25,7 @@ 

  #global     prerel ...

  %global     upstream_version %{general_version}%{?prerel}

  Version:    %{general_version}%{?prerel:~%{prerel}}

- Release:    1%{?dist}

+ Release:    2%{?dist}

  Epoch:      1

  Summary:    Python documentation generator

  
@@ -360,6 +357,9 @@ 

  

  

  %changelog

+ * Thu Jul 13 2023 Karolina Surma <ksurma@redhat.com> - 1:6.2.1-2

+ - Don't use websupport to build documentation on RHEL

+ 

  * Mon Jun 26 2023 Karolina Surma <ksurma@redhat.com> - 1:6.2.1-1

  - Update to 6.2.1

  - Fixes rhbz#2188968

  • modernize bcond expressions to match the updated websupport

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/a71a78b2f7a940ddb8874d600cee7a35

Let me think out loud here.

Previously

  • on Fedora, imagemagick_tests were enabled
  • on RHEL 7-, imagemagick_tests were enabled
  • on RHEL 8+, imagemagick_tests were disabled

In this PR

  • on Fedora, imagemagick_tests are enabled
  • on RHEL 7-, imagemagick_tests are enabled
  • on RHEL 8+, imagemagick_tests are disabled

However, since 0%{?rhel} is 0 on Fedora, the first part of the conditional seems redundant.
Also, I don't think this spec file needs to concern itself with ancient RHELs, so it will probably be nicer if we disregard RHEL 7 and lower entirely. and simply use %bcond imagemagick_tests %{undefined rhel}. WDYT?

2 new commits added

  • Modernize %bconds
  • Don't use sphinxcontrib-websupport to build the documentation on RHEL
11 months ago

Makes sense, I rebased the second commit.

Build failed. More information on how to proceed and troubleshoot errors available at https://fedoraproject.org/wiki/Zuul-based-ci
https://fedora.softwarefactory-project.io/zuul/buildset/2294a4277f814be799ab13113104c278

$ rpmdiff python-sphinx-6.2.1-2.{fc39,eln128}.src.rpm
removed     REQUIRES ImageMagick  
removed     REQUIRES python3-sphinxcontrib-websupport  
removed     REQUIRES python3dist(html5lib)  
removed     PROVIDES python3-sphinx = 1:6.2.1-2.fc39
removed     PROVIDES python3-sphinx-latex = 1:6.2.1-2.fc39
removed     PROVIDES python-sphinx-doc = 1:6.2.1-2.fc39
added       PROVIDES python3-sphinx = 1:6.2.1-2.eln128
added       PROVIDES python3-sphinx-latex = 1:6.2.1-2.eln128
added       PROVIDES python-sphinx-doc = 1:6.2.1-2.eln128

Looking good, thanks. I'll merge and build.

Pull-Request has been merged by churchyard

11 months ago

Thank you for this, it will help drop a few packages from the ELN buildroot.

Metadata