diff --git a/.gitignore b/.gitignore index 1941243..0ca2fc2 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /sphinx_rtd_theme-*.tar.gz +/objects.inv diff --git a/python-sphinx_rtd_theme.rpmlintrc b/python-sphinx_rtd_theme.rpmlintrc new file mode 100644 index 0000000..a827ee0 --- /dev/null +++ b/python-sphinx_rtd_theme.rpmlintrc @@ -0,0 +1,8 @@ +# THIS FILE IS FOR WHITELISTING RPMLINT ERRORS AND WARNINGS IN TASKOTRON +# https://fedoraproject.org/wiki/Taskotron/Tasks/dist.rpmlint#Whitelisting_errors + +# Words not in the dictionary +addFilter(r'W: spelling-error .* (readthedocs|rtd)') + +# Dangling font symlinks: the Requires ensure they will not dangle +addFilter(r'W: dangling-symlink .*fonts') diff --git a/python-sphinx_rtd_theme.spec b/python-sphinx_rtd_theme.spec index ff2ad4c..15e4a5c 100644 --- a/python-sphinx_rtd_theme.spec +++ b/python-sphinx_rtd_theme.spec @@ -5,12 +5,15 @@ Name: python-%{srcname} Version: 0.4.3 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Sphinx theme for readthedocs.org License: MIT URL: https://github.com/rtfd/%{srcname} Source0: https://github.com/rtfd/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz +# 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 @@ -19,11 +22,13 @@ Patch0: %{name}-script.patch BuildArch: noarch BuildRequires: python3-devel +BuildRequires: python3dist(docutils) BuildRequires: python3dist(setuptools) %if %{without bootstrap} BuildRequires: python3dist(pytest) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinxcontrib-httpdomain) +BuildRequires: python-sphinx-doc %endif %description @@ -47,17 +52,36 @@ It's currently in development and includes some rtd variable checks that can be ignored if you're just trying to use it on your project outside of that site. +%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) + +%description doc +This package contains documentation for the Sphinx theme for +readthedocs.org. +%endif + %prep %autosetup -p0 -n %{srcname}-%{version} +# Use local objects.inv for intersphinx +sed -e "s|\('https://docs\.readthedocs\.io/en/latest/', \)None|\1'%{SOURCE1}'|" \ + -e "s|\('http://www\.sphinx-doc\.org/en/stable/', \)None|\1'%{_docdir}/python-sphinx-doc/html/objects.inv'|" \ + -i docs/conf.py + %build %py3_build %if %{without bootstrap} # Build the documentation -make -C docs html SPHINXBUILD=sphinx-build-3 +make -C docs html %endif +rst2html --no-datestamp README.rst README.html %install %py3_install @@ -84,6 +108,7 @@ 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 @@ -94,13 +119,21 @@ cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \ %{__python3} setup.py test %endif - %files -n python3-%{srcname} -%doc README.rst +%doc README.html %license LICENSE %{python3_sitelib}/%{srcname}* +%if %{without bootstrap} +%files doc +%doc docs/build/html +%license LICENSE +%endif + %changelog +* Fri Jan 24 2020 Jerry James - 0.4.3-8 +- Add -doc subpackage + * Thu Oct 03 2019 Miro HronĨok - 0.4.3-7 - Rebuilt for Python 3.8.0rc1 (#1748018) diff --git a/sources b/sources index 5e0d10a..41e554d 100644 --- a/sources +++ b/sources @@ -1 +1,2 @@ SHA512 (sphinx_rtd_theme-0.4.3.tar.gz) = 6e5d4d0c44ea8acdf382dd589a194be2777e4c4f66f27705eb32d0507cf71b9d289df860bc3d9845242629cd92d62154040f9063f1c05ff6f329e210e14a6a9a +SHA512 (objects.inv) = 29b2885c23f0d9697f6fa88ded72d7d622a0807ea34f4fe04fefe3809dc44486333cdfade4dc5bc99d18ff50423f6291d63d704c5a74b1d755eb52fbbc617c08