File python-oslo.i18n-SLE_12_SP1.spec of Package openstack-macros

%global sname oslo.i18n

Name:           python-oslo.i18n
Version:        3.3.0
Release:        0
Summary:        OpenStack i18n library
License:        Apache-2.0
Url:            https://launchpad.net/%{sname}
Source0:        https://pypi.python.org/packages/source/o/%{sname}/%{sname}-%{version}.tar.gz
BuildRequires:  openstack-macros
BuildRequires:  python-Babel
BuildRequires:  python-mock
BuildRequires:  python-oslotest
BuildRequires:  python-pbr
BuildRequires:  python-setuptools
Requires:       python-Babel >= 1.3
Requires:       python-six >= 1.9.0
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:  python-Sphinx
BuildRequires:  python-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
export PYTHONPATH="%{python2_sitelib}:%{buildroot}%{python2_sitelib}"
testr init && testr run --parallel

%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
openSUSE Build Service is sponsored by