From 03d25ebf2b980250b968746154503920a6b2830e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 6 Mar 2019 15:21:15 +0100 Subject: [PATCH] Initial import (#1685515) --- .gitignore | 1 + python-sphinxcontrib-devhelp.spec | 83 +++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 85 insertions(+) create mode 100644 .gitignore create mode 100644 python-sphinxcontrib-devhelp.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..266f75a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/sphinxcontrib-devhelp-*.tar.gz diff --git a/python-sphinxcontrib-devhelp.spec b/python-sphinxcontrib-devhelp.spec new file mode 100644 index 0000000..a7bb458 --- /dev/null +++ b/python-sphinxcontrib-devhelp.spec @@ -0,0 +1,83 @@ +%global pypi_name sphinxcontrib-devhelp + +# when bootstrapping sphinx, we cannot run tests yet +%bcond_with check + +Name: python-%{pypi_name} +Version: 1.0.1 +Release: 1%{?dist} +Summary: Sphinx extension for Devhelp documents +License: BSD +URL: http://sphinx-doc.org/ +Source0: %{pypi_source} +BuildArch: noarch + +BuildRequires: gettext +BuildRequires: python3-devel +BuildRequires: python3-setuptools + +%if %{with check} +BuildRequires: python3-pytest +BuildRequires: python3-sphinx >= 1:2 +%endif + +%description +sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. + + +%package -n python3-%{pypi_name} +Summary: %{summary} +%{?python_provide:%python_provide python3-%{pypi_name}} + +%description -n python3-%{pypi_name} +sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document. + + +%prep +%autosetup -n %{pypi_name}-%{version} +find -name '*.mo' -delete + + +%build +for po in $(find -name '*.po'); do + msgfmt --output-file=${po%.po}.mo ${po} +done +%py3_build + + +%install +%py3_install + +# Move language files to /usr/share +pushd %{buildroot}%{python3_sitelib} +for lang in `find sphinxcontrib/devhelp/locales -maxdepth 1 -mindepth 1 -type d -not -path '*/\.*' -printf "%f "`; +do + test $lang == __pycache__ && continue + install -d %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES + mv sphinxcontrib/devhelp/locales/$lang/LC_MESSAGES/*.mo %{buildroot}%{_datadir}/locale/$lang/LC_MESSAGES/ +done +rm -rf sphinxcontrib/devhelp/locales +ln -s %{_datadir}/locale sphinxcontrib/devhelp/locales +popd + + +%find_lang sphinxcontrib.devhelp + + +%if %{with check} +%check +%{__python3} -m pytest +%endif + + +%files -n python3-%{pypi_name} -f sphinxcontrib.devhelp.lang +%license LICENSE +%doc README.rst +%{python3_sitelib}/sphinxcontrib/ +%{python3_sitelib}/sphinxcontrib_devhelp-%{version}-py%{python3_version}-*.pth +%{python3_sitelib}/sphinxcontrib_devhelp-%{version}-py%{python3_version}.egg-info/ + + +%changelog +* Fri Mar 01 2019 Miro HronĨok - 1.0.1-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..875e09a --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (sphinxcontrib-devhelp-1.0.1.tar.gz) = 135d6405e330cc245391646d4055988cf762d82f6473e58c64a76f3a88e7f33a66baba366e7f29e1378320bd0c374af92b0f972bceeec8c05ad0fe652a81e984