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}
3674f9c
Version:        1.0.1
9e0bbe7
Release:        6%{?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
3674f9c
BuildRequires:  python3-devel
3674f9c
BuildRequires:  python3-setuptools
3674f9c
3674f9c
%if %{with check}
3674f9c
BuildRequires:  python3-pytest
6eed30c
BuildRequires:  python3-sphinx >= 1:2
3674f9c
%endif
3674f9c
3674f9c
%description
3674f9c
sphinxcontrib-applehelp is a sphinx extension which outputs Apple help books.
3674f9c
3674f9c
3674f9c
%package -n     python3-%{pypi_name}
3674f9c
Summary:        %{summary}
3674f9c
%{?python_provide:%python_provide python3-%{pypi_name}}
3674f9c
3674f9c
%description -n python3-%{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
3674f9c
%{__python3} -m pytest
3674f9c
%endif
3674f9c
3674f9c
3674f9c
%files -n python3-%{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
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