14
0
forked from pool/python-polib
Files
python-polib/python-polib.spec

87 lines
2.4 KiB
RPMSpec

#
# spec file for package polib
#
# Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany.
# Copyright (c) 2011 LISA GmbH, Bingen, Germany.
#
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-polib
Version: 0.7.0
Release: 0
URL: http://bitbucket.org/izi/polib/
Summary: A library to manipulate gettext files
License: X11/MIT
Group: Productivity/Other
Source: polib-%{version}.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python-devel
BuildRequires: python-Sphinx
%if 0%{?suse_version}
BuildRequires: fdupes
%py_requires
%if 0%{?suse_version} > 1110
BuildArch: noarch
%endif
%endif
%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}
%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: Productivity/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.
%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}
%if 0%{?suse_version}
%fdupes -s %{buildroot}/%{_prefix}
%endif
%check
sh ./runtests.sh
%files
%defattr(-,root,root)
%doc LICENSE CHANGELOG README.rst
%{python_sitelib}/*
%files doc
%defattr(-,root,root)
%doc docs/_build/html
%changelog