Blame SPECS/python-sphinxcontrib-qthelp.spec

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