Blame SPECS/python-sphinxcontrib-htmlhelp.spec

26f8e3
%global pypi_name sphinxcontrib-htmlhelp
26f8e3
26f8e3
# to avoid unwanted dependency on html5lib, we skip the tests entirely
26f8e3
%bcond_with check
26f8e3
26f8e3
Name:           python-%{pypi_name}
26f8e3
Version:        1.0.3
26f8e3
Release:        6%{?dist}
26f8e3
Summary:        Sphinx extension for HTML help files
26f8e3
License:        BSD
26f8e3
URL:            http://sphinx-doc.org/
26f8e3
Source0:        %{pypi_source}
26f8e3
BuildArch:      noarch
26f8e3
26f8e3
BuildRequires:  gettext
26f8e3
BuildRequires:  python%{python3_pkgversion}-devel
26f8e3
BuildRequires:  python%{python3_pkgversion}-setuptools
26f8e3
26f8e3
%if %{with check}
26f8e3
BuildRequires:  python%{python3_pkgversion}-pytest
26f8e3
BuildRequires:  python%{python3_pkgversion}-sphinx >= 1:2
26f8e3
BuildRequires:  python%{python3_pkgversion}-html5lib
26f8e3
%endif
26f8e3
26f8e3
%description
26f8e3
sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.
26f8e3
26f8e3
26f8e3
%package -n     python%{python3_pkgversion}-%{pypi_name}
26f8e3
Summary:        %{summary}
26f8e3
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
26f8e3
26f8e3
%description -n python%{python3_pkgversion}-%{pypi_name}
26f8e3
sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files.
26f8e3
26f8e3
26f8e3
%prep
26f8e3
%autosetup -n %{pypi_name}-%{version}
26f8e3
find -name '*.mo' -delete
26f8e3
26f8e3
26f8e3
%build
26f8e3
for po in $(find -name '*.po'); do
26f8e3
  msgfmt --output-file=${po%.po}.mo ${po}
26f8e3
done
26f8e3
%py3_build
26f8e3
26f8e3
26f8e3
%install
26f8e3
%py3_install
26f8e3
26f8e3
# Move language files to /usr/share
26f8e3
pushd %{buildroot}%{python3_sitelib}
26f8e3
for lang in `find sphinxcontrib/htmlhelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
26f8e3
do
26f8e3
  test $lang == __pycache__ && continue
26f8e3
  install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
26f8e3
  mv sphinxcontrib/htmlhelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
26f8e3
done
26f8e3
rm -rf sphinxcontrib/htmlhelp/locales
26f8e3
ln -s %{_datadir}/locale sphinxcontrib/htmlhelp/locales
26f8e3
popd
26f8e3
26f8e3
26f8e3
%find_lang sphinxcontrib.htmlhelp
26f8e3
26f8e3
26f8e3
%if %{with check}
26f8e3
%check
26f8e3
%{__python3} -m pytest
26f8e3
%endif
26f8e3
26f8e3
26f8e3
%files -n python%{python3_pkgversion}-%{pypi_name} -f sphinxcontrib.htmlhelp.lang
26f8e3
%license LICENSE
26f8e3
%doc README.rst
26f8e3
%{python3_sitelib}/sphinxcontrib/
26f8e3
%{python3_sitelib}/sphinxcontrib_htmlhelp-%{version}-py%{python3_version}-*.pth
26f8e3
%{python3_sitelib}/sphinxcontrib_htmlhelp-%{version}-py%{python3_version}.egg-info/
26f8e3
26f8e3
26f8e3
%changelog
26f8e3
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.3-6
26f8e3
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
26f8e3
  Related: rhbz#1991688
26f8e3
26f8e3
* Fri May 07 2021 Miro Hrončok <mhroncok@redhat.com> - 1.0.3-5
26f8e3
- Build without check
26f8e3
- No longer BuildRequires python3-html5lib
26f8e3
26f8e3
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.3-4
26f8e3
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
26f8e3
26f8e3
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-3
26f8e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
26f8e3
26f8e3
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2
26f8e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
26f8e3
26f8e3
* Thu Jun 04 2020 Charalampos Stratakis <cstratak@redhat.com> - 1.0.3-1
26f8e3
- Update to 1.0.3 (#1699073)
26f8e3
26f8e3
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-8
26f8e3
- Rebuilt for Python 3.9
26f8e3
26f8e3
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-7
26f8e3
- Bootstrap for Python 3.9
26f8e3
26f8e3
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
26f8e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
26f8e3
26f8e3
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-5
26f8e3
- Rebuilt for Python 3.8.0rc1 (#1748018)
26f8e3
26f8e3
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-4
26f8e3
- Rebuilt for Python 3.8
26f8e3
26f8e3
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-3
26f8e3
- Bootstrap for Python 3.8
26f8e3
26f8e3
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
26f8e3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
26f8e3
26f8e3
* Fri Mar 01 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-1
26f8e3
- Initial package