File python3-polib.spec of Package python3-polib

#
# spec file for package python3-polib
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, 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:           python3-polib
Version:        1.0.3
Release:        0
Summary:        Library to Manipulate gettext Files (PO and MO Files)
License:        MIT
Group:          Development/Languages/Python
Url:            http://bitbucket.org/izi/polib/
Source0:        http://bitbucket.org/izi/polib/downloads/polib-%{version}.tar.gz
Patch0:         endian.patch
BuildRequires:  python-Sphinx
BuildRequires:  python3-devel
BuildRequires:  python3-distribute
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

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

%package doc
Summary:        Documentation for Library to Manipulate gettext Files
Group:          Documentation/Other
Requires:       %{name} = %{version}

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

This package contains documentation in HTML format.

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

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

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

%check
./runtests.sh

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

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

%changelog
openSUSE Build Service is sponsored by