Files
rpm-packaging/openstack/oslo.context/oslo.context.spec.j2
Dirk Müller df25bcc20a Update to new oslo releases
Change-Id: I02674308ec6ee9ca869d70ecc324fee0aab4aa6a
2023-12-27 15:44:13 +01:00

82 lines
2.2 KiB
Django/Jinja

{% set pypi_name = 'oslo.context' %}
{% set upstream_version = upstream_version('5.3.0') %}
{% set rpm_release = '1' %}
{% set source = url_pypi() %}
%bcond_without test
Name: {{ py2name() }}
Version: {{ py2rpmversion() }}
Release: {{ py2rpmrelease() }}
Summary: OpenStack Oslo context library
License: {{ license('Apache-2.0') }}
Group: Development/Languages/Python
URL: https://docs.openstack.org/{{ pypi_name }}
Source0: {{ source }}
BuildRequires: openstack-macros
BuildRequires: {{ py3('pbr') }}
BuildArch: noarch
%if %{with test}
BuildRequires: {{ py3('debtcollector') }}
BuildRequires: {{ py3('fixtures') }}
BuildRequires: {{ py3('oslotest') }}
BuildRequires: {{ py3('stestr') }}
%endif
%description
The Oslo context library has helpers to maintain useful information
about a request context.
The request context is usually populated in the WSGI pipeline and
used by various modules such as logging.
%package -n {{ py2name(py_versions='py3') }}
Summary: OpenStack Oslo context library
Requires: {{ py3('debtcollector') }}
%description -n {{ py2name(py_versions='py3') }}
The Oslo context library has helpers to maintain useful information
about a request context.
The request context is usually populated in the WSGI pipeline and
used by various modules such as logging.
This package contains the Python 3.x module.
%package -n {{ py2name() }}-doc
Summary: Documentation for OpenStack common context library
Group: Documentation/HTML
BuildRequires: {{ py3('Sphinx') }}
BuildRequires: {{ py3('openstackdocstheme') }}
%description -n {{ py2name() }}-doc
Documentation for the oslo-context library.
%prep
%autosetup -p1 -n {{ pypi_name }}-{{ upstream_version }}
%py_req_cleanup
%build
%{py3_build}
# 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}
%install
%{py3_install}
%if %{with test}
%check
%{openstack_stestr_run}
%endif
%files -n {{ py2name(py_versions='py3') }}
%license LICENSE
%doc README.rst
%{python3_sitelib}/oslo_context
%{python3_sitelib}/*.egg-info
%files -n {{ py2name() }}-doc
%license LICENSE
%doc doc/build/html
%changelog