#2 Version 0.5.0.
Opened a month ago by jjames. Modified a month ago
rpms/ jjames/python-sphinx_rtd_theme master  into  master

@@ -1,39 +0,0 @@ 

- Remove deprecated use of script_files

- 

- Fixes sphinx-doc/sphinx#6088

- 

- * Add script block

- * Fix build error

- 

- --- sphinx_rtd_theme/layout.html.orig	2019-02-12 12:37:47.000000000 -0700

- +++ sphinx_rtd_theme/layout.html	2019-08-06 09:02:26.103136905 -0600

- @@ -29,6 +29,7 @@

-    {% endif %}

-  

-    {# JAVASCRIPTS #}

- +  {%- block scripts %}

-    <script type="text/javascript" src="{{ pathto('_static/js/modernizr.min.js', 1) }}"></script>

-    {%- if not embedded %}

-    {# XXX Sphinx 1.8.0 made this an external js-file, quick fix until we refactor the template to inherert more blocks directly from sphinx #}

- @@ -62,6 +63,7 @@

-            href="{{ pathto('_static/opensearch.xml', 1) }}"/>

-      {%- endif %}

-    {%- endif %}

- +  {%- endblock %}

-  

-    {# CSS #}

-    <link rel="stylesheet" href="{{ pathto('_static/' + style, 1) }}" type="text/css" />

- --- sphinx_rtd_theme/search.html.orig	2019-02-12 12:37:47.000000000 -0700

- +++ sphinx_rtd_theme/search.html	2019-08-06 09:03:25.597117851 -0600

- @@ -9,7 +9,10 @@

-  #}

-  {%- extends "layout.html" %}

-  {% set title = _('Search') %}

- -{% set script_files = script_files + ['_static/searchtools.js'] %}

- +{%- block scripts %}

- +    {{ super() }}

- +    <script type="text/javascript" src="{{ pathto('_static/searchtools.js', 1) }}"></script>

- +{%- endblock %}

-  {% block footer %}

-    <script type="text/javascript">

-      jQuery(function() { Search.loadIndex("{{ pathto('searchindex.js', 1) }}"); });

file modified
+62 -39

@@ -4,8 +4,8 @@ 

  %bcond_with bootstrap

  

  Name:           python-%{srcname}

- Version:        0.4.3

- Release:        13%{?dist}

+ Version:        0.5.0

+ Release:        1%{?dist}

  Summary:        Sphinx theme for readthedocs.org

  

  License:        MIT

@@ -14,21 +14,22 @@ 

  # The koji builders do not have network access, and this file is not included

  # in any Fedora package, so we retrieve it for offline use.

  Source1:        https://docs.readthedocs.io/en/latest/objects.inv

- # Remove deprecated use of script_files.  See:

- # - https://github.com/readthedocs/sphinx_rtd_theme/pull/728

- # - https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c8821123091166fae1897d702cdc2d627

- Patch0:         %{name}-script.patch

  

  BuildArch:      noarch

  

+ BuildRequires:  font(fontawesome)

+ BuildRequires:  font(lato)

+ BuildRequires:  font(robotoslab)

+ BuildRequires:  fontconfig

+ BuildRequires:  js-html5shiv

  BuildRequires:  python3-devel

- BuildRequires:  python3dist(docutils)

- BuildRequires:  python3dist(setuptools)

+ BuildRequires:  %{py3_dist docutils}

+ BuildRequires:  %{py3_dist readthedocs-sphinx-ext}

+ BuildRequires:  %{py3_dist setuptools}

  %if %{without bootstrap}

- BuildRequires:  python3dist(pytest)

- BuildRequires:  python3dist(readthedocs-sphinx-ext)

- BuildRequires:  python3dist(sphinx)

- BuildRequires:  python3dist(sphinxcontrib-httpdomain)

+ BuildRequires:  %{py3_dist pytest}

+ BuildRequires:  %{py3_dist sphinx}

+ BuildRequires:  %{py3_dist sphinxcontrib-httpdomain}

  BuildRequires:  python-sphinx-doc

  %endif

  

@@ -40,7 +41,6 @@ 

  

  %package -n python3-%{srcname}

  Summary:        Sphinx theme for readthedocs.org

- Requires:       fontawesome-fonts-web

  Requires:       font(fontawesome)

  Requires:       font(lato)

  Requires:       font(robotoslab)

@@ -56,7 +56,6 @@ 

  %if %{without bootstrap}

  %package doc

  Summary:        Documentation for the Sphinx theme for readthedocs.org

- Requires:       fontawesome-fonts-web

  Requires:       font(fontawesome)

  Requires:       font(lato)

  Requires:       font(robotoslab)

@@ -74,6 +73,39 @@ 

      -e "s|\('http://www\.sphinx-doc\.org/en/stable/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \

      -i docs/conf.py

  

+ # Unbundle fonts

+ fontawesome=$(dirname $(fc-match -f "%%{file}" "fontawesome"))/fontawesome-webfont.ttf

+ lato=$(fc-match -f "%%{file}" "lato")

+ lato_bold=$(fc-match -f "%%{file}" "lato:bold")

+ lato_bdit=$(fc-match -f "%%{file}" "lato:bold:italic")

+ lato_ital=$(fc-match -f "%%{file}" "lato:italic")

+ roboto=$(fc-match -f "%%{file}" "robotoslab")

+ roboto_bold=$(fc-match -f "%%{file}" "robotoslab:bold")

+ sed -e "s|fonts/fontawesome[^;]*;[^;]*;|\"file://$fontawesome\") format(\"truetype\");|" \

+     -e "s|fonts/lato-normal[^;]*;|\"file://$lato\") format(\"truetype\");|" \

+     -e "s|fonts/lato-bold\.[^;]*;|\"file://$lato_bold\") format(\"truetype\");|" \

+     -e "s|fonts/lato-bold-italic[^;]*;|\"file://$lato_bdit\") format(\"truetype\");|" \

+     -e "s|fonts/lato-normal-italic[^;]*;|\"file://$lato_ital\") format(\"truetype\");|" \

+     -e "s|fonts/lato-normal[^;]*;|\"file://$lato\") format(\"truetype\");|" \

+     -e "s|fonts/Roboto-Slab-Regular[^;]*;|\"file://$roboto\") format(\"truetype\");|" \

+     -e "s|fonts/Roboto-Slab-Bold[^;]*;|\"file://$roboto_bold\") format(\"truetype\");|" \

+     -i sphinx_rtd_theme/static/css/theme.css

+ sed -e "s|fonts/fontawesome[^:]*:|\"file://$fontawesome\") format(\"truetype\").fa:|" \

+     -i sphinx_rtd_theme/static/css/badge_only.css

+ sed -ir '/(eot|svg|ttf|woff)/d' MANIFEST.in

+ 

+ # Unbundle html5shiv

+ sed -i "s|{{ pathto('_static/js/html5shiv\.min\.js', 1) }}|%{_datadir}/javascript/html5shiv.min.js|" sphinx_rtd_theme/layout.html

+ 

+ # We cannot build the Javascript from source at this time, due to many missing

+ # dependencies.  Convince the build script to skip building the Javascript and

+ # go on to the python.

+ mkdir -p build/lib/%{srcname}/static/js

+ cp -p %{_datadir}/javascript/html5shiv*.min.js build/lib/%{srcname}/static/js

+ cp -p sphinx_rtd_theme/static/js/badge_only.js build/lib/%{srcname}/static/js

+ cp -p sphinx_rtd_theme/static/js/theme.js build/lib/%{srcname}/static/js

+ sed -i "/'build_py'/d" setup.py

+ 

  %build

  %py3_build

  

@@ -87,40 +119,24 @@ 

  %install

  %py3_install

  

- # Link to the required fonts and copy the parts not shipped by Fedora

- pushd %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts

- mkdir Lato RobotoSlab

- rm -f fontawesome-webfont.*

- ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.eot .

- ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.svg .

- ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.ttf .

- ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff .

- ln -s %{_datadir}/fonts/fontawesome/fontawesome-webfont.woff2 .

- ln -s %{_datadir}/fonts/google-roboto-slab-fonts/RobotoSlab-Bold.ttf RobotoSlab/roboto-slab-v7-bold.ttf

- ln -s %{_datadir}/fonts/google-roboto-slab-fonts/RobotoSlab-Regular.ttf RobotoSlab/roboto-slab-v7-regular.ttf

- ln -s %{_datadir}/fonts/lato/Lato-Bold.ttf Lato/lato-bold.ttf

- ln -s %{_datadir}/fonts/lato/Lato-BoldItalic.ttf Lato/lato-bolditalic.ttf

- ln -s %{_datadir}/fonts/lato/Lato-Italic.ttf Lato/lato-italic.ttf

- ln -s %{_datadir}/fonts/lato/Lato-Regular.ttf Lato/lato-regular.ttf

- popd

- cp -p fonts/RobotoSlab/*.{eot,woff,woff2} \

-    %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/RobotoSlab

- cp -p fonts/Lato/*.{eot,woff,woff2} \

-    %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/Lato

- 

  %if %{without bootstrap}

  rm docs/build/html/.buildinfo

- rm -fr docs/build/html/_static/fonts

- cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \

-    docs/build/html/_static

  %endif

  

+ # Unbundle fonts

+ rm -fr %{buildroot}%{python3_sitelib}/%{srcname}/static/css/fonts

+ 

+ # Unbundle html5shiv

+ rm %{buildroot}%{python3_sitelib}/%{srcname}/static/js/html5shiv*

+ 

+ %find_lang sphinx

+ 

  %if %{without bootstrap}

  %check

  pytest

  %endif

  

- %files -n python3-%{srcname}

+ %files -n python3-%{srcname} -f sphinx.lang

  %doc README.html

  %license LICENSE

  %{python3_sitelib}/%{srcname}*

@@ -132,6 +148,13 @@ 

  %endif

  

  %changelog

+ * Tue Jun 30 2020 Jerry James <loganjerry@gmail.com> - 0.5.0-1

+ - Version 0.5.0

+ - Drop upstreamed -script patch

+ - Use fc-match for a more robust approach to finding fonts

+ - Do not even link to fonts; modify the CSS to point to system fonts

+ - Unbundle html5shiv

+ 

  * Sat May 23 2020 Miro HronĨok <mhroncok@redhat.com> - 0.4.3-13

  - Rebuilt for Python 3.9

  

file modified
+2 -2

@@ -1,2 +1,2 @@ 

- SHA512 (sphinx_rtd_theme-0.4.3.tar.gz) = 6e5d4d0c44ea8acdf382dd589a194be2777e4c4f66f27705eb32d0507cf71b9d289df860bc3d9845242629cd92d62154040f9063f1c05ff6f329e210e14a6a9a

- SHA512 (objects.inv) = 29b2885c23f0d9697f6fa88ded72d7d622a0807ea34f4fe04fefe3809dc44486333cdfade4dc5bc99d18ff50423f6291d63d704c5a74b1d755eb52fbbc617c08

+ SHA512 (sphinx_rtd_theme-0.5.0.tar.gz) = e5d3f653649f10bcbb953fa18fe79f2b8663da205cc6c6d4ee702789b86de19ac525065b214e3e419e0a34feda35e54b3abd5e82b2a5e657821675125dc9dfdc

+ SHA512 (objects.inv) = 0cbcf05bee00960975cc37c98c5ed3ee0c8125e68114e70394c44df81714dcfe99fd8eb7f2ca2fd936d522051ccfde61412cd9585050c492f5a0d368a88cba0b

  • Drop upstreamed -script patch.
  • Use fc-match for a more robust approach to finding fonts.
  • Do not even link to fonts; modify the CSS to point to system fonts.
  • Unbundle html5shiv.