c907d1d
%bcond_without tests
c907d1d
f9ad5ea
%global pypi_name sphinx-kr-theme
f9ad5ea
f9ad5ea
Name:           python-%{pypi_name}
f9ad5ea
Version:        0.2.1
c907d1d
Release:        3%{?dist}
f9ad5ea
Summary:        Kenneth Reitz's krTheme for Sphinx
f9ad5ea
f9ad5ea
License:        BSD
f9ad5ea
URL:            https://github.com/tonyseek/sphinx-kr-theme
f9ad5ea
Source0:        %{pypi_source}
c907d1d
%if %{with tests}
c907d1d
# Tests are not included in the PyPI tarball
c907d1d
Source1:        https://raw.githubusercontent.com/tonyseek/sphinx-kr-theme/57834e237e35b59b5957aacb7ac072e434dd5e93/tests.py
c907d1d
%endif
f9ad5ea
BuildArch:      noarch
f9ad5ea
f9ad5ea
BuildRequires:  python3-devel
f9ad5ea
BuildRequires:  python3dist(setuptools)
f9ad5ea
c907d1d
%if %{with tests}
c907d1d
BuildRequires:  python3dist(pytest)
c907d1d
%endif
c907d1d
f9ad5ea
%description
f9ad5ea
This is a repackaging of Kenneth Reitz's krTheme, a theme for use in 
f9ad5ea
Sphinx documentation, originally derived from Mitsuhiko's Flask theme.
f9ad5ea
f9ad5ea
%package -n     python3-%{pypi_name}
f9ad5ea
Summary:        %{summary}
f9ad5ea
f9ad5ea
Requires:       python3dist(setuptools)
c907d1d
%if 0%{?fedora} < 33 || 0%{?rhel} < 9
c907d1d
%py_provides    python3-%{pypi_name}
c907d1d
%endif
c907d1d
f9ad5ea
%description -n python3-%{pypi_name}
f9ad5ea
This is a repackaging of Kenneth Reitz's krTheme, a theme for use in 
f9ad5ea
Sphinx documentation, originally derived from Mitsuhiko's Flask theme.
f9ad5ea
f9ad5ea
%prep
f9ad5ea
%autosetup -n %{pypi_name}-%{version}
f9ad5ea
# Remove bundled egg-info
f9ad5ea
rm -rf %{pypi_name}.egg-info
f9ad5ea
f9ad5ea
%build
f9ad5ea
%py3_build
f9ad5ea
c907d1d
%if %{with tests}
c907d1d
%check
c907d1d
export PYTHONPATH=%{buildroot}%{python3_sitelib}
c907d1d
%pytest %{SOURCE1}
c907d1d
%endif
c907d1d
f9ad5ea
%install
f9ad5ea
%py3_install
f9ad5ea
f9ad5ea
%files -n python3-%{pypi_name}
f9ad5ea
%license LICENSE
f9ad5ea
%doc README.rst
f9ad5ea
%{python3_sitelib}/sphinx_kr_theme
f9ad5ea
%{python3_sitelib}/sphinx_kr_theme-%{version}-py%{python3_version}.egg-info
f9ad5ea
f9ad5ea
%changelog
c907d1d
* Fri Oct 30 2020 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.1-3
c907d1d
- Add py_provides for F32
c907d1d
- Run tests
c907d1d
f9ad5ea
* Wed Oct 28 2020 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.1-2
f9ad5ea
- Use pypi_source
f9ad5ea
- Fix license
f9ad5ea
f9ad5ea
* Wed Oct 28 2020 Davide Cavalca <dcavalca@fedoraproject.org> - 0.2.1-1
f9ad5ea
- Initial package.