File python-polib.spec of Package python-polib

#
# spec file for package python-polib
#
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2013 LISA GmbH, Bingen, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-polib
Version:        1.0.6
Release:        0
Url:            http://bitbucket.org/izi/polib/
Summary:        A library to manipulate gettext files
License:        MIT
Group:          Development/Languages/Python
Source0:        https://pypi.python.org/packages/source/p/polib/polib-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python-Sphinx
BuildRequires:  python-devel
%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
BuildArch:      noarch
%endif

%description
polib allows you to manipulate, create, modify gettext catalogs (.pot, .po and
binary .mo files). You can load existing files, iterate through it's entries,
add, modify entries, comments or metadata, etc... or create new po/pot files
from scratch.

polib provides a simple and pythonic API, exporting only two convenience
functions 'pofile' and 'mofile', and the 4 core classes: POFile, MOFile,
POEntry and MOEntry for creating new files/entries.

%package doc
Summary:        A library to manipulate gettext files
Group:          Documentation/Other
Requires:       %{name} = %{version}

%description doc
polib allows you to manipulate, create, modify gettext catalogs (.pot, .po and
binary .mo files). You can load existing files, iterate through it's entries,
add, modify entries, comments or metadata, etc... or create new po/pot files
from scratch.

polib provides a simple and pythonic API, exporting only two convenience
functions 'pofile' and 'mofile', and the 4 core classes: POFile, MOFile,
POEntry and MOEntry for creating new files/entries.

This package contains documentation in HTML format.

%prep
%setup -q -n polib-%{version}

%build
python setup.py build
pushd docs
make html
rm _build/html/.buildinfo
popd

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}

%check
./runtests.sh

%files
%defattr(-,root,root)
%doc LICENSE CHANGELOG README.rst
%{python_sitelib}/*

%files doc
%defattr(-,root,root)
%doc docs/_build/html

%changelog
openSUSE Build Service is sponsored by