Blob Blame Raw
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
%global pypi_name oslo.policy
%global pkg_name oslo-policy
%if 0%{?fedora} >=24
%global with_python3 1
Name:           python-%{pkg_name}
Version:        1.14.0
Release:        8%{?dist}
Summary:        OpenStack oslo.policy library
License:        ASL 2.0
BuildArch:      noarch
An OpenStack library for policy.
%package -n python2-%{pkg_name}
Summary:        OpenStack oslo.policy library
%{?python_provide:%python_provide python2-%{pkg_name}}
BuildRequires:  python2-devel
BuildRequires:  python-pbr
# test dependencies
BuildRequires:  python-hacking
BuildRequires:  python-oslotest
BuildRequires:  python-requests-mock
BuildRequires:  python-coverage
BuildRequires:  python-fixtures
BuildRequires:  python-mock
BuildRequires:  python-requests
BuildRequires:  PyYAML >= 3.1.0
Requires:       python-oslo-config >= 2:3.14.0
Requires:       python-oslo-i18n >= 2.1.0
Requires:       python-oslo-serialization >= 1.10.0
Requires:       python-oslo-utils >= 3.16.0
Requires:       python-six >= 1.9.0
Requires:       PyYAML >= 3.1.0
%description -n python2-%{pkg_name}
An OpenStack library for policy.
%package -n python-%{pkg_name}-doc
Summary:    Documentation for the Oslo policy library
BuildRequires:  python-sphinx
BuildRequires:  python-oslo-sphinx
BuildRequires:  python-oslo-config
BuildRequires:  python-oslo-serialization
BuildRequires:  python-oslo-i18n
%description -n python-%{pkg_name}-doc
Documentation for the Oslo policy library.
%package -n python-%{pkg_name}-tests
Summary:    Test subpackage for the Oslo policy library
Requires:  python-%{pkg_name} = %{version}-%{release}
Requires:  python-hacking
Requires:  python-oslotest
Requires:  python-requests-mock
Requires:  python-coverage
Requires:  python-fixtures
Requires:  python-mock
Requires:  python-requests
%description -n python-%{pkg_name}-tests
Test subpackage for the Oslo policy library
%if 0%{?with_python3}
%package -n python3-%{pkg_name}
Summary:        OpenStack oslo.policy library
%{?python_provide:%python_provide python3-%{pkg_name}}
BuildRequires:  python3-devel
BuildRequires:  python3-pbr
# test dependencies
BuildRequires:  python3-hacking
BuildRequires:  python3-oslotest
BuildRequires:  python3-requests-mock
BuildRequires:  python3-coverage
BuildRequires:  python3-fixtures
BuildRequires:  python3-mock
BuildRequires:  python3-requests
BuildRequires:  python3-PyYAML >= 3.1.0
Requires:       python3-oslo-config >= 2:3.14.0
Requires:       python3-oslo-i18n >= 2.1.0
Requires:       python3-oslo-serialization >= 1.10.0
Requires:       python3-oslo-utils >= 3.16.0
Requires:       python3-six >= 1.9.0
Requires:       python3-PyYAML >= 3.1.0
%description -n python3-%{pkg_name}
An OpenStack library for policy.
%if 0%{?with_python3}
%package -n python3-%{pkg_name}-tests
Summary:    Test subpackage for the Oslo policy library
Requires:  python3-%{pkg_name} = %{version}-%{release}
Requires:  python3-hacking
Requires:  python3-oslotest
Requires:  python3-requests-mock
Requires:  python3-coverage
Requires:  python3-fixtures
Requires:  python3-mock
Requires:  python3-requests
%description -n python3-%{pkg_name}-tests
Test subpackage for the Oslo policy library
%setup -q -n %{pypi_name}-%{upstream_version}
# Let RPM handle the dependencies
rm -f requirements.txt
# generate html docs
sphinx-build doc/source html
# remove the sphinx-build leftovers
rm -rf html/.{doctrees,buildinfo}
%if 0%{?with_python3}
%if 0%{?with_python3}
%{__python2} test
%if 0%{?with_python3}
rm -rf .testrepository
%{__python3} test
%files -n python2-%{pkg_name}
%doc README.rst
%license LICENSE
%exclude %{python2_sitelib}/oslo_policy/tests
%files -n python-%{pkg_name}-doc
%doc html
%license LICENSE
%files -n python-%{pkg_name}-tests
%if 0%{?with_python3}
%files -n python3-%{pkg_name}
%doc README.rst
%license LICENSE
%exclude %{python3_sitelib}/oslo_policy/tests
%if 0%{?with_python3}
%files -n python3-%{pkg_name}-tests
* Sat Jul 14 2018 Fedora Release Engineering <> - 1.14.0-8
- Rebuilt for
* Tue Jun 19 2018 Miro Hrončok <> - 1.14.0-7
- Rebuilt for Python 3.7
* Mon May 28 2018 Javier Peña <> - 1.14.0-6
- Fix unit test execution (bz#1556228)
* Fri Feb 09 2018 Fedora Release Engineering <> - 1.14.0-5
- Rebuilt for
* Thu Jul 27 2017 Fedora Release Engineering <> - 1.14.0-4
- Rebuilt for
* Sat Feb 11 2017 Fedora Release Engineering <> - 1.14.0-3
- Rebuilt for
* Mon Dec 19 2016 Miro Hrončok <> - 1.14.0-2
- Rebuild for Python 3.6
* Wed Sep 07 2016 Haikel Guemar <> 1.14.0-1
- Update to 1.14.0