Blame python-sphinx-tabs.spec

7fdb21f
%global pypi_name sphinx-tabs
7fdb21f
%global python_module_name sphinx_tabs
7fdb21f
7fdb21f
Name:           python-sphinx-tabs
928d4e9
Version:        3.1.0
0b06721
Release:        6%{?dist}
7fdb21f
Summary:        Tabbed views for Sphinx
7fdb21f
License:        MIT
7fdb21f
URL:            https://github.com/executablebooks/sphinx-tabs
7fdb21f
Source0:        https://github.com/executablebooks/%{pypi_name}/archive/v%{version}/%{pypi_name}-%{version}.tar.gz
7fdb21f
7fdb21f
BuildArch:      noarch
7fdb21f
f025681
# IMPROVE: Use Sphinx HTML assets policy to decide whether include assets
f025681
# We apply this so other atches apply cleanly
f025681
Patch1:         https://github.com/executablebooks/sphinx-tabs/pull/132.patch
f025681
3bd12a8
# Fix the test using Sphinx 4+ features so it actually works
f025681
Patch2:         https://github.com/executablebooks/sphinx-tabs/pull/133.patch
f025681
f025681
# Fix tests for Pygments 2.10+, merged upstream
f025681
Patch3:         https://github.com/executablebooks/sphinx-tabs/pull/135.patch
3bd12a8
df48b0d
%if 0%{?fedora} > 35
6e164bc
# Fix compatibility with docutils >= 0.17.
6e164bc
Patch4:         https://github.com/executablebooks/sphinx-tabs/pull/144.patch
df48b0d
%endif
6e164bc
6e164bc
7fdb21f
%global _description %{expand:
7fdb21f
Create tabbed content in Sphinx documentation when building HTML.}
7fdb21f
7fdb21f
BuildRequires:  pyproject-rpm-macros
7fdb21f
BuildRequires:  python3-devel
7fdb21f
BuildRequires:  python3dist(setuptools)
7fdb21f
# Needed for testing
7fdb21f
BuildRequires:  python3dist(beautifulsoup4)
7fdb21f
BuildRequires:  python3dist(pygments)
7fdb21f
BuildRequires:  python3dist(pytest)
3bd12a8
BuildRequires:  python3dist(pytest-regressions)
7fdb21f
BuildRequires:  python3dist(sphinx)
7fdb21f
7fdb21f
%generate_buildrequires
7fdb21f
%pyproject_buildrequires
7fdb21f
7fdb21f
7fdb21f
%description %{_description}
7fdb21f
7fdb21f
7fdb21f
%package -n python3-%{pypi_name}
7fdb21f
Summary:        %{summary}
7fdb21f
7fdb21f
%description -n python3-%{pypi_name} %{_description}
7fdb21f
7fdb21f
7fdb21f
%package -n python3-%{pypi_name}-doc
7fdb21f
Summary:        HTML documentation for %{pypi_name}
7fdb21f
Requires:       python3-%{pypi_name}
7fdb21f
7fdb21f
%description -n python3-%{pypi_name}-doc
7fdb21f
%{summary}.
7fdb21f
7fdb21f
7fdb21f
%prep
7fdb21f
%autosetup -p1 -n %{pypi_name}-%{version}
7fdb21f
7fdb21f
7fdb21f
%build
7fdb21f
%pyproject_wheel
7fdb21f
7fdb21f
PYTHONPATH=$(pwd) sphinx-build -b html docs html_docs
7fdb21f
7fdb21f
7fdb21f
%install
7fdb21f
%pyproject_install
7fdb21f
%pyproject_save_files %{python_module_name}
7fdb21f
7fdb21f
7fdb21f
%check
3bd12a8
# rinohtype extension to Sphinx is not yet packaged
3bd12a8
%pytest -k 'not test_rinohtype_pdf'
7fdb21f
7fdb21f
%files -n  python3-%{pypi_name} -f %{pyproject_files}
7fdb21f
%license LICENSE
7fdb21f
%doc CHANGELOG.md README.md
7fdb21f
7fdb21f
%files -n python3-%{pypi_name}-doc
7fdb21f
%doc html_docs/*
7fdb21f
7fdb21f
7fdb21f
%changelog
0b06721
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-6
0b06721
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
0b06721
6e164bc
* Sat Oct 02 2021 Richard Shaw <hobbes1069@gmail.com> - 3.1.0-5
6e164bc
- Add patch for docutils >= 0.17.
6e164bc
f025681
* Fri Aug 20 2021 Miro HronĨok <mhroncok@redhat.com> - 3.1.0-4
f025681
- Fix tests for Pygments 2.10
f025681
3bd12a8
* Thu Aug 05 2021 Karolina Surma <ksurma@redhat.com> - 3.1.0-3
3bd12a8
- Enable tests in %%check
3bd12a8
- Fix the test using Sphinx 4+ features
3bd12a8
bab306f
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.1.0-2
bab306f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
bab306f
928d4e9
* Mon Jun 28 2021 Karolina Surma <ksurma@redhat.com> - 3.1.0-1
928d4e9
- Update to 3.1.0
928d4e9
b310a6d
* Fri Jun 04 2021 Python Maint <python-maint@redhat.com> - 2.0.0-3
b310a6d
- Rebuilt for Python 3.10
b310a6d
7fdb21f
* Sun Feb 07 2021 Richard Shaw <hobbes1069@gmail.com> - 2.0.0-2
7fdb21f
- Make sure doc subpackage requires main package.
7fdb21f
- Add __pycache__ dir to %%files temporarily, see:
7fdb21f
  https://bugzilla.redhat.com/show_bug.cgi?id=1925963
7fdb21f
7fdb21f
* Fri Feb 05 2021 Richard Shaw <hobbes1069@gmail.com> - 2.0.0-1
7fdb21f
- Update to latest release and correct spec per reviewer comments.
7fdb21f
7fdb21f
* Wed Dec  9 2020 Richard Shaw <hobbes1069@gmail.com> 1.3.0-1
7fdb21f
- Initial Packaging