rpm-packaging/openstack/oslo.i18n/oslo.i18n.spec.j2

59 lines
1.5 KiB
Django/Jinja

%global sname oslo.i18n
Name: {{ py2name('oslo.i18n') }}
Version: 3.6.0
Release: 0
Summary: OpenStack i18n library
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
Url: https://launchpad.net/%{sname}
Source0: https://pypi.io/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('Babel') }}
BuildRequires: {{ py2pkg('mock') }}
BuildRequires: {{ py2pkg('oslotest') }}
BuildRequires: {{ py2pkg('pbr') }}
Requires: {{ py2pkg('Babel') }}
Requires: {{ py2pkg('six') }}
BuildArch: noarch
%description
The oslo.i18n library contain utilities for working with internationalization
(i18n) features, especially translation for text strings in an application
or library.
%package doc
Summary: Documentation for OpenStack i18n library
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('oslosphinx') }}
%description doc
Documentation for the oslo.i18n library.
%prep
%setup -q -n %{sname}-%{version}
%build
%{__python2} setup.py build
%install
%{__python2} setup.py install --skip-build --root %{buildroot}
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
%{__python2} setup.py test
%files
%doc AUTHORS ChangeLog CONTRIBUTING.rst HACKING.rst LICENSE PKG-INFO README.rst
%{python2_sitelib}/oslo_i18n
%{python2_sitelib}/*.egg-info
%files doc
%doc doc/build/html
%doc LICENSE
%changelog