| 1 | %global pypi_name sphinxcontrib-qthelp |
|---|
| 2 | |
|---|
| 3 | # when bootstrapping sphinx, we cannot run tests yet |
|---|
| 4 | %bcond_with check |
|---|
| 5 | |
|---|
| 6 | Summary: Sphinx extension for QtHelp documents |
|---|
| 7 | Name: python-%{pypi_name} |
|---|
| 8 | Version: 1.0.3 |
|---|
| 9 | Release: 3%{?_dist_release} |
|---|
| 10 | Group: programming |
|---|
| 11 | Vendor: Project Vine |
|---|
| 12 | Distribution: Vine Linux |
|---|
| 13 | |
|---|
| 14 | License: BSD |
|---|
| 15 | URL: http://sphinx-doc.org/ |
|---|
| 16 | Source0: %{pypi_source} |
|---|
| 17 | |
|---|
| 18 | BuildArch: noarch |
|---|
| 19 | |
|---|
| 20 | BuildRequires: gettext |
|---|
| 21 | BuildRequires: python3-devel |
|---|
| 22 | BuildRequires: python3-setuptools |
|---|
| 23 | |
|---|
| 24 | %if %{with check} |
|---|
| 25 | BuildRequires: python3-pytest |
|---|
| 26 | BuildRequires: python3-sphinx >= 1:2 |
|---|
| 27 | %endif |
|---|
| 28 | |
|---|
| 29 | %description |
|---|
| 30 | sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. |
|---|
| 31 | |
|---|
| 32 | |
|---|
| 33 | %package -n python3-%{pypi_name} |
|---|
| 34 | Summary: %{summary} |
|---|
| 35 | Group: programming |
|---|
| 36 | %{?python_provide:%python_provide python3-%{pypi_name}} |
|---|
| 37 | |
|---|
| 38 | %description -n python3-%{pypi_name} |
|---|
| 39 | sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document. |
|---|
| 40 | |
|---|
| 41 | |
|---|
| 42 | %prep |
|---|
| 43 | %autosetup -n %{pypi_name}-%{version} |
|---|
| 44 | find -name '*.mo' -delete |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | %build |
|---|
| 48 | for po in $(find -name '*.po'); do |
|---|
| 49 | msgfmt --output-file=${po%.po}.mo ${po} |
|---|
| 50 | done |
|---|
| 51 | %py3_build |
|---|
| 52 | |
|---|
| 53 | |
|---|
| 54 | %install |
|---|
| 55 | %py3_install |
|---|
| 56 | |
|---|
| 57 | # Move language files to /usr/share |
|---|
| 58 | pushd %{buildroot}%{python3_sitelib} |
|---|
| 59 | for lang in `find sphinxcontrib/qthelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`; |
|---|
| 60 | do |
|---|
| 61 | test $lang == __pycache__ && continue |
|---|
| 62 | install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES |
|---|
| 63 | mv sphinxcontrib/qthelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/ |
|---|
| 64 | done |
|---|
| 65 | rm -rf sphinxcontrib/qthelp/locales |
|---|
| 66 | ln -s %{_datadir}/locale sphinxcontrib/qthelp/locales |
|---|
| 67 | popd |
|---|
| 68 | |
|---|
| 69 | |
|---|
| 70 | %find_lang sphinxcontrib.qthelp |
|---|
| 71 | |
|---|
| 72 | |
|---|
| 73 | %if %{with check} |
|---|
| 74 | %check |
|---|
| 75 | %pytest |
|---|
| 76 | %endif |
|---|
| 77 | |
|---|
| 78 | |
|---|
| 79 | %files -n python3-%{pypi_name} -f sphinxcontrib.qthelp.lang |
|---|
| 80 | %license LICENSE |
|---|
| 81 | %doc README.rst |
|---|
| 82 | %{python3_sitelib}/sphinxcontrib/ |
|---|
| 83 | %{python3_sitelib}/sphinxcontrib_qthelp-%{version}-py%{python3_version}-*.pth |
|---|
| 84 | %{python3_sitelib}/sphinxcontrib_qthelp-%{version}-py%{python3_version}.egg-info/ |
|---|
| 85 | |
|---|
| 86 | |
|---|
| 87 | %changelog |
|---|
| 88 | * Sun Aug 16 2020 Tomohiro "Tomo-p" KATO <tomop@teamgedoh.net> - 1.0.3-3 |
|---|
| 89 | - initial build for Vine Linux. |
|---|
| 90 | |
|---|
| 91 | * Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.3-2 |
|---|
| 92 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild |
|---|
| 93 | |
|---|
| 94 | * Mon Jun 01 2020 Charalampos Stratakis <cstratak@redhat.com> - 1.0.3-1 |
|---|
| 95 | - Update to 1.0.3 (#1808636) |
|---|
| 96 | |
|---|
| 97 | * Sat May 23 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-8 |
|---|
| 98 | - Rebuilt for Python 3.9 |
|---|
| 99 | |
|---|
| 100 | * Fri May 22 2020 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-7 |
|---|
| 101 | - Bootstrap for Python 3.9 |
|---|
| 102 | |
|---|
| 103 | * Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-6 |
|---|
| 104 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild |
|---|
| 105 | |
|---|
| 106 | * Thu Oct 03 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-5 |
|---|
| 107 | - Rebuilt for Python 3.8.0rc1 (#1748018) |
|---|
| 108 | |
|---|
| 109 | * Fri Aug 16 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-4 |
|---|
| 110 | - Rebuilt for Python 3.8 |
|---|
| 111 | |
|---|
| 112 | * Thu Aug 15 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-3 |
|---|
| 113 | - Bootstrap for Python 3.8 |
|---|
| 114 | |
|---|
| 115 | * Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-2 |
|---|
| 116 | - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild |
|---|
| 117 | |
|---|
| 118 | * Fri Mar 01 2019 Miro Hrončok <mhroncok@redhat.com> - 1.0.2-1 |
|---|
| 119 | - Initial package |
|---|