Blame python-sphinxcontrib-applehelp.spec

3674f9c
%global pypi_name sphinxcontrib-applehelp
3674f9c
3674f9c
# when bootstrapping sphinx, we cannot run tests yet
28528c4
%bcond_without check
3674f9c
3674f9c
Name:           python-%{pypi_name}
4a99ae4
Version:        1.0.2
bdef9d9
Release:        7%{?dist}
3674f9c
Summary:        Sphinx extension for Apple help books
3674f9c
License:        BSD
3674f9c
URL:            http://sphinx-doc.org/
3674f9c
Source0:        %{pypi_source}
3674f9c
BuildArch:      noarch
3674f9c
3674f9c
BuildRequires:  gettext
7d3f28f
BuildRequires:  python%{python3_pkgversion}-devel
7d3f28f
BuildRequires:  python%{python3_pkgversion}-setuptools
3674f9c
3674f9c
%if %{with check}
7d3f28f
BuildRequires:  python%{python3_pkgversion}-pytest
7d3f28f
BuildRequires:  python%{python3_pkgversion}-sphinx >= 1:2
3674f9c
%endif
3674f9c
3674f9c
%description
3674f9c
sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books.
3674f9c
3674f9c
7d3f28f
%package -n     python%{python3_pkgversion}-%{pypi_name}
3674f9c
Summary:        %{summary}
7d3f28f
%{?python_provide:%python_provide python%{python3_pkgversion}-%{pypi_name}}
3674f9c
7d3f28f
%description -n python%{python3_pkgversion}-%{pypi_name}
3674f9c
sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books.
3674f9c
3674f9c
3674f9c
%prep
3674f9c
%autosetup -n %{pypi_name}-%{version}
3674f9c
find -name '*.mo' -delete
3674f9c
3674f9c
3674f9c
%build
3674f9c
for po in $(find -name '*.po'); do
3674f9c
  msgfmt --output-file=${po%.po}.mo ${po}
3674f9c
done
3674f9c
%py3_build
3674f9c
3674f9c
3674f9c
%install
3674f9c
%py3_install
3674f9c
3674f9c
# Move language files to /usr/share
3674f9c
pushd %{buildroot}%{python3_sitelib}
3674f9c
for lang in `find sphinxcontrib/applehelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`;
3674f9c
do
3674f9c
  test $lang == __pycache__ && continue
3674f9c
  install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES
3674f9c
  mv sphinxcontrib/applehelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/
3674f9c
done
3674f9c
rm -rf sphinxcontrib/applehelp/locales
3674f9c
ln -s %{_datadir}/locale sphinxcontrib/applehelp/locales
3674f9c
popd
3674f9c
3674f9c
3674f9c
%find_lang sphinxcontrib.applehelp
3674f9c
3674f9c
3674f9c
%if %{with check}
3674f9c
%check
4a99ae4
%pytest
3674f9c
%endif
3674f9c
3674f9c
7d3f28f
%files -n python%{python3_pkgversion}-%{pypi_name} -f sphinxcontrib.applehelp.lang
3674f9c
%license LICENSE
3674f9c
%doc README.rst
3674f9c
%{python3_sitelib}/sphinxcontrib/
3674f9c
%{python3_sitelib}/sphinxcontrib_applehelp-%{version}-py%{python3_version}-*.pth
3674f9c
%{python3_sitelib}/sphinxcontrib_applehelp-%{version}-py%{python3_version}.egg-info/
3674f9c
3674f9c
3674f9c
%changelog
bdef9d9
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-7
bdef9d9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
bdef9d9
476cb0c
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-6
476cb0c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
476cb0c
08c90cc
* Thu Jun 03 2021 Python Maint <python-maint@redhat.com> - 1.0.2-5
08c90cc
- Rebuilt for Python 3.10
08c90cc
70dcaa7
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 1.0.2-4
70dcaa7
- Bootstrap for Python 3.10
70dcaa7
4101ca6
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-3
4101ca6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
4101ca6
a398921
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2
a398921
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
a398921
4a99ae4
* Mon Jun 01 2020 Charalampos Stratakis <cstratak@redhat.com> - 1.0.2-1
4a99ae4
- Update to 1.0.2 (#1808632)
4a99ae4
09531c5
* Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-8
09531c5
- Rebuilt for Python 3.9
09531c5
c2b7ad1
* Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-7
c2b7ad1
- Bootstrap for Python 3.9
c2b7ad1
9e0bbe7
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-6
9e0bbe7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
9e0bbe7
3feadcf
* Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-5
3feadcf
- Rebuilt for Python 3.8.0rc1 (#1748018)
3feadcf
4de013e
* Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-4
4de013e
- Rebuilt for Python 3.8
4de013e
8d888ed
* Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-3
8d888ed
- Bootstrap for Python 3.8
8d888ed
497c81c
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.1-2
497c81c
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
497c81c
3674f9c
* Fri Mar 01 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.1-1
3674f9c
- Initial package