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

67 lines
2.0 KiB
Django/Jinja

{% set pypi_name = 'oslo.i18n' %}
{% set upstream_version = upstream_version('3.23.1') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: OpenStack i18n library
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://launchpad.net/{{ pypi_name }}
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py2pkg('Babel', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('mock', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('oslotest', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('pbr', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('stestr', py_versions=['py2', 'py3']) }}
BuildRequires: {{ py2pkg('testscenarios', py_versions=['py2', 'py3']) }}
Requires: {{ py2pkg('Babel') }}
Requires: {{ py2pkg('six') }}
BuildArch: noarch
%python_subpackages
%description
The oslo.i18n library contain utilities for working with internationalization
(i18n) features, especially translation for text strings in an application
or library.
%package -n python-oslo.i18n-doc
Summary: Documentation for OpenStack i18n library
BuildRequires: {{ py2pkg('Sphinx') }}
BuildRequires: {{ py2pkg('openstackdocstheme') }}
%description -n python-oslo.i18n-doc
Documentation for the oslo.i18n library.
%prep
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
%py_req_cleanup
%build
%{python_build}
%install
%{python_install}
# generate html docs
PBR_VERSION=%{version} sphinx-build -b html doc/source doc/build/html
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%check
%python_exec -m stestr.cli run
%files %{python_files}
%license LICENSE
%{python_sitelib}/oslo_i18n
%{python_sitelib}/*egg-info
%files -n python-oslo.i18n-doc
%doc doc/build/html ChangeLog CONTRIBUTING.rst README.rst
%license LICENSE
%changelog