17
0

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
This commit is contained in:
2017-07-09 10:44:02 +00:00
committed by Git OBS Bridge
parent 0fee6d13b0
commit 69fa577c2d
2 changed files with 32 additions and 20 deletions

View File

@@ -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

View File

@@ -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