66b9cd3
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
66b9cd3
42f732f
%global pypi_name oslo.context
efd5630
%global pkg_name oslo-context
6adebe2
ba53b85
ba53b85
%global with_doc 1
ba53b85
a82f4bb
%global common_desc \
a82f4bb
The OpenStack Oslo context library has helpers to maintain \
a82f4bb
useful information about a request context. \
a82f4bb
The request context is usually populated in the \
a82f4bb
WSGI pipeline and used by various modules such as logging.
a82f4bb
efd5630
Name:           python-%{pkg_name}
ba53b85
Version:        2.22.1
0326efb
Release:        2%{?dist}
42f732f
Summary:        OpenStack Oslo Context library
42f732f
42f732f
License:        ASL 2.0
66b9cd3
URL:            https://launchpad.net/oslo.context
af0b104
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
42f732f
42f732f
BuildArch:      noarch
42f732f
9ffbb61
BuildRequires:  git
42f732f
ba53b85
%if 0%{?with_doc}
efd5630
%package -n python-%{pkg_name}-doc
efd5630
Summary:        Documentation for the OpenStack Oslo context library
42f732f
77e1e3b
BuildRequires:  python3-sphinx
77e1e3b
BuildRequires:  python3-openstackdocstheme
42f732f
efd5630
%description -n python-%{pkg_name}-doc
6adebe2
Documentation for the OpenStack Oslo context library.
ba53b85
%endif
6adebe2
ba53b85
# python3
efd5630
%package -n python3-%{pkg_name}
6adebe2
Summary:        OpenStack Oslo Context library
efd5630
%{?python_provide:%python_provide python3-%{pkg_name}}
6adebe2
BuildRequires:  python3-devel
6adebe2
BuildRequires:  python3-pbr
6adebe2
efd5630
# test dependencies
efd5630
BuildRequires:  python3-hacking
efd5630
BuildRequires:  python3-oslotest
efd5630
9ffbb61
Requires:       python3-debtcollector >= 1.2.0
efd5630
Requires:       python3-pbr
6adebe2
efd5630
%description -n python3-%{pkg_name}
a82f4bb
%{common_desc}
6adebe2
ba53b85
a24c364
%package -n python3-%{pkg_name}-tests
a24c364
Summary:   Tests for OpenStack Oslo context library
a24c364
a24c364
Requires:  python3-%{pkg_name} = %{version}-%{release}
a24c364
a24c364
%description -n python3-%{pkg_name}-tests
a24c364
Tests for OpenStack Oslo context library
efd5630
ba53b85
%description
ba53b85
%{common_desc}
ba53b85
42f732f
%prep
9ffbb61
%autosetup -n %{pypi_name}-%{upstream_version} -S git
ba53b85
rm -rf *requirements.txt
42f732f
42f732f
%build
ba53b85
ba53b85
%if 0%{?with_doc}
42f732f
# doc
77e1e3b
%{__python3} setup.py build_sphinx
ba53b85
# Remove the sphinx-build-3 leftovers
a82f4bb
rm -fr doc/build/html/.{doctrees,buildinfo}
ba53b85
%endif
42f732f
ba53b85
%py3_build
6adebe2
42f732f
%install
ba53b85
efd5630
%py3_install
6adebe2
efd5630
%check
ba53b85
rm -rf .testrepository
efd5630
%{__python3} setup.py test
efd5630
ba53b85
efd5630
%files -n python3-%{pkg_name}
6adebe2
%license LICENSE
6adebe2
%doc README.rst
6adebe2
%{python3_sitelib}/oslo_context
6adebe2
%{python3_sitelib}/*.egg-info
efd5630
%exclude %{python3_sitelib}/oslo_context/tests
6adebe2
ba53b85
%if 0%{?with_doc}
efd5630
%files -n python-%{pkg_name}-doc
42f732f
%license LICENSE
a82f4bb
%doc doc/build/html
ba53b85
%endif
42f732f
a24c364
%files -n python3-%{pkg_name}-tests
a24c364
%license LICENSE
a24c364
%{python3_sitelib}/oslo_context/tests
a24c364
42f732f
%changelog
0326efb
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.22.1-2
0326efb
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
0326efb
ba53b85
* Fri Mar 08 2019 RDO <dev@lists.rdoproject.org> 2.22.1-1
ba53b85
- Update to 2.22.1
42f732f