From 69fa577c2d6d616ddfc48e304a86d7935bea26015ae27828d293ef11f905c41f Mon Sep 17 00:00:00 2001 From: Hans-Peter Jansen Date: Sun, 9 Jul 2017 10:44:02 +0000 Subject: [PATCH] Accepting request 508988 from home:alois:branches:devel:languages:python OBS-URL: https://build.opensuse.org/request/show/508988 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-translationstring?expand=0&rev=10 --- python-translationstring.changes | 6 +++++ python-translationstring.spec | 46 ++++++++++++++++++-------------- 2 files changed, 32 insertions(+), 20 deletions(-) diff --git a/python-translationstring.changes b/python-translationstring.changes index 8a59818..574374c 100644 --- a/python-translationstring.changes +++ b/python-translationstring.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jul 9 07:37:49 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Enabled tests + ------------------------------------------------------------------- Wed Mar 9 08:41:58 UTC 2016 - bwiedemann@suse.com diff --git a/python-translationstring.spec b/python-translationstring.spec index ddd9cef..8639efd 100644 --- a/python-translationstring.spec +++ b/python-translationstring.spec @@ -1,7 +1,7 @@ # # spec file for package python-translationstring # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2015 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -17,24 +17,24 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-translationstring Version: 1.3 Release: 0 -Url: http://www.repoze.org Summary: Utility library for i18n relied on by various Repoze and Pyramid packages License: SUSE-Repoze Group: Development/Languages/Python -Source: translationstring-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-pylons_sphinx_theme -BuildRequires: python-setuptools -# Documentation requirements: -BuildRequires: python-Sphinx -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +Url: http://www.repoze.org +Source: https://files.pythonhosted.org/packages/source/t/translationstring/translationstring-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +# SECTION documentation requirements +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module pylons-sphinx-themes} +# /SECTION +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildArch: noarch -%endif +%python_subpackages %description A library used by various Pylons Project packages for internationalization @@ -46,32 +46,38 @@ Chameleon templates use translation facilities of this package. It does not depend on Babel, but its translation and pluralization services are meant to work best when provided with an instance of the babel.support.Translations class. -%package doc -Summary: Utility library for i18n relied on by various Repoze and Pyramid packages +%package -n %{name}-doc +Summary: Documentation files for %{name} Group: Development/Languages/Python Requires: %{name} = %{version} +Provides: %{python_module translationstring-doc = %{version}} -%description doc +%description -n %{name}-doc This package contains documentation files for %{name}. %prep %setup -q -n translationstring-%{version} # drop build date from doc to fix build-compare sed -i "s/\(html_last_updated_fmt = \).*/\\1None/" docs/conf.py +rm -rf translationstring.egg-info %build -python setup.py build +%python_build pushd docs && make html && rm _build/html/.buildinfo %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%files +%check +%python_exec setup.py test + +%files %{python_files} %defattr(-,root,root,-) %doc *.txt -%python_sitelib/* +%{python_sitelib}/* -%files doc +%files -n %{name}-doc %defattr(-,root,root,-) %doc docs/_build/html