Add -doc subpackage.

This commit is contained in:
Jerry James 2020-01-24 12:41:16 -07:00
parent 929a2c490b
commit 000fa94e82
4 changed files with 47 additions and 4 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/sphinx_rtd_theme-*.tar.gz /sphinx_rtd_theme-*.tar.gz
/objects.inv

View File

@ -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')

View File

@ -5,12 +5,15 @@
Name: python-%{srcname} Name: python-%{srcname}
Version: 0.4.3 Version: 0.4.3
Release: 7%{?dist} Release: 8%{?dist}
Summary: Sphinx theme for readthedocs.org Summary: Sphinx theme for readthedocs.org
License: MIT License: MIT
URL: https://github.com/rtfd/%{srcname} URL: https://github.com/rtfd/%{srcname}
Source0: https://github.com/rtfd/%{srcname}/archive/%{version}/%{srcname}-%{version}.tar.gz 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: # Remove deprecated use of script_files. See:
# - https://github.com/readthedocs/sphinx_rtd_theme/pull/728 # - https://github.com/readthedocs/sphinx_rtd_theme/pull/728
# - https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c8821123091166fae1897d702cdc2d627 # - https://github.com/readthedocs/sphinx_rtd_theme/commit/a49a812c8821123091166fae1897d702cdc2d627
@ -19,11 +22,13 @@ Patch0: %{name}-script.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3dist(docutils)
BuildRequires: python3dist(setuptools) BuildRequires: python3dist(setuptools)
%if %{without bootstrap} %if %{without bootstrap}
BuildRequires: python3dist(pytest) BuildRequires: python3dist(pytest)
BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx)
BuildRequires: python3dist(sphinxcontrib-httpdomain) BuildRequires: python3dist(sphinxcontrib-httpdomain)
BuildRequires: python-sphinx-doc
%endif %endif
%description %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 can be ignored if you're just trying to use it on your project outside
of that site. 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 %prep
%autosetup -p0 -n %{srcname}-%{version} %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 %build
%py3_build %py3_build
%if %{without bootstrap} %if %{without bootstrap}
# Build the documentation # Build the documentation
make -C docs html SPHINXBUILD=sphinx-build-3 make -C docs html
%endif %endif
rst2html --no-datestamp README.rst README.html
%install %install
%py3_install %py3_install
@ -84,6 +108,7 @@ cp -p fonts/Lato/*.{eot,woff,woff2} \
%{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/Lato %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts/Lato
%if %{without bootstrap} %if %{without bootstrap}
rm docs/build/html/.buildinfo
rm -fr docs/build/html/_static/fonts rm -fr docs/build/html/_static/fonts
cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \ cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \
docs/build/html/_static docs/build/html/_static
@ -94,13 +119,21 @@ cp -a %{buildroot}%{python3_sitelib}/%{srcname}/static/fonts \
%{__python3} setup.py test %{__python3} setup.py test
%endif %endif
%files -n python3-%{srcname} %files -n python3-%{srcname}
%doc README.rst %doc README.html
%license LICENSE %license LICENSE
%{python3_sitelib}/%{srcname}* %{python3_sitelib}/%{srcname}*
%if %{without bootstrap}
%files doc
%doc docs/build/html
%license LICENSE
%endif
%changelog %changelog
* Fri Jan 24 2020 Jerry James <loganjerry@gmail.com> - 0.4.3-8
- Add -doc subpackage
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.3-7 * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 0.4.3-7
- Rebuilt for Python 3.8.0rc1 (#1748018) - Rebuilt for Python 3.8.0rc1 (#1748018)

View File

@ -1 +1,2 @@
SHA512 (sphinx_rtd_theme-0.4.3.tar.gz) = 6e5d4d0c44ea8acdf382dd589a194be2777e4c4f66f27705eb32d0507cf71b9d289df860bc3d9845242629cd92d62154040f9063f1c05ff6f329e210e14a6a9a SHA512 (sphinx_rtd_theme-0.4.3.tar.gz) = 6e5d4d0c44ea8acdf382dd589a194be2777e4c4f66f27705eb32d0507cf71b9d289df860bc3d9845242629cd92d62154040f9063f1c05ff6f329e210e14a6a9a
SHA512 (objects.inv) = 29b2885c23f0d9697f6fa88ded72d7d622a0807ea34f4fe04fefe3809dc44486333cdfade4dc5bc99d18ff50423f6291d63d704c5a74b1d755eb52fbbc617c08