|
Alan Pevec |
8ff2bad |
%global pypi_name oslo.utils
|
|
|
764dfae |
%global pkg_name oslo-utils
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
%if 0%{?fedora} >= 24
|
|
|
c2a3905 |
%global with_python3 1
|
|
|
c2a3905 |
%endif
|
|
|
c2a3905 |
|
|
Alan Pevec |
adb05a9 |
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
|
|
Alan Pevec |
adb05a9 |
|
|
Alan Pevec |
8ff2bad |
Name: python-oslo-utils
|
|
|
44ce036 |
Version: 3.22.0
|
|
|
44ce036 |
Release: 1%{?dist}
|
|
Alan Pevec |
8ff2bad |
Summary: OpenStack Oslo Utility library
|
|
Alan Pevec |
8ff2bad |
|
|
Alan Pevec |
8ff2bad |
License: ASL 2.0
|
|
Alan Pevec |
8ff2bad |
URL: http://launchpad.net/oslo
|
|
|
44ce036 |
Source0: https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{upstream_version}.tar.gz
|
|
Alan Pevec |
8ff2bad |
BuildArch: noarch
|
|
Alan Pevec |
8ff2bad |
|
|
|
c2a3905 |
%description
|
|
|
c2a3905 |
The OpenStack Oslo Utility library.
|
|
|
c2a3905 |
* Documentation: http://docs.openstack.org/developer/oslo.utils
|
|
|
c2a3905 |
* Source: http://git.openstack.org/cgit/openstack/oslo.utils
|
|
|
c2a3905 |
* Bugs: http://bugs.launchpad.net/oslo
|
|
|
c2a3905 |
|
|
|
764dfae |
%package -n python2-%{pkg_name}
|
|
|
c2a3905 |
Summary: OpenStack Oslo Utility library
|
|
|
764dfae |
%{?python_provide:%python_provide python2-%{pkg_name}}
|
|
|
c2a3905 |
|
|
Alan Pevec |
8ff2bad |
BuildRequires: python2-devel
|
|
|
764dfae |
BuildRequires: python-funcsigs
|
|
Alan Pevec |
8ff2bad |
BuildRequires: python-pbr
|
|
|
764dfae |
# Required for documentation building
|
|
|
764dfae |
BuildRequires: python-iso8601
|
|
|
764dfae |
BuildRequires: python-monotonic
|
|
|
764dfae |
BuildRequires: pytz
|
|
|
764dfae |
|
|
|
764dfae |
# test requirements
|
|
|
f5880e5 |
BuildRequires: pyparsing
|
|
|
764dfae |
BuildRequires: python-hacking
|
|
|
764dfae |
BuildRequires: python-fixtures
|
|
|
764dfae |
BuildRequires: python-oslo-config
|
|
|
764dfae |
BuildRequires: python-oslotest
|
|
|
764dfae |
BuildRequires: python-testscenarios
|
|
|
764dfae |
BuildRequires: python-testtools
|
|
|
764dfae |
BuildRequires: python-testrepository
|
|
|
764dfae |
BuildRequires: python-funcsigs
|
|
|
f5880e5 |
# Required to compile translation files
|
|
|
f5880e5 |
BuildRequires: python-babel
|
|
|
764dfae |
|
|
|
f5880e5 |
Requires: pyparsing
|
|
|
764dfae |
Requires: python-funcsigs
|
|
Alan Pevec |
8ff2bad |
Requires: python-oslo-config
|
|
Alan Pevec |
8ff2bad |
Requires: python-oslo-i18n
|
|
Alan Pevec |
8ff2bad |
Requires: python-babel
|
|
|
764dfae |
Requires: python-funcsigs
|
|
Alan Pevec |
8ff2bad |
Requires: python-iso8601
|
|
Alan Pevec |
8ae9784 |
Requires: python-six >= 1.9.0
|
|
Alan Pevec |
23a31e5 |
Requires: python-netaddr >= 0.7.12
|
|
Alan Pevec |
23a31e5 |
Requires: python-netifaces >= 0.10.4
|
|
Alan Pevec |
bff93be |
Requires: python-debtcollector >= 0.3.0
|
|
Alan Pevec |
8ae9784 |
Requires: pytz
|
|
|
db17997 |
Requires: python-monotonic
|
|
|
f5880e5 |
Requires: python-%{pkg_name}-lang = %{version}-%{release}
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
%description -n python2-%{pkg_name}
|
|
Alan Pevec |
8ff2bad |
The OpenStack Oslo Utility library.
|
|
Alan Pevec |
8ff2bad |
* Documentation: http://docs.openstack.org/developer/oslo.utils
|
|
Alan Pevec |
8ff2bad |
* Source: http://git.openstack.org/cgit/openstack/oslo.utils
|
|
Alan Pevec |
8ff2bad |
* Bugs: http://bugs.launchpad.net/oslo
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
|
|
|
764dfae |
%package -n python-%{pkg_name}-doc
|
|
Alan Pevec |
23a31e5 |
Summary: Documentation for the Oslo Utility library
|
|
Alan Pevec |
8ff2bad |
|
|
Alan Pevec |
8ff2bad |
BuildRequires: python-sphinx
|
|
Alan Pevec |
bff93be |
BuildRequires: python-oslo-sphinx
|
|
Alan Pevec |
23a31e5 |
# for API autodoc
|
|
|
764dfae |
BuildRequires: python-iso8601
|
|
|
764dfae |
BuildRequires: python-monotonic
|
|
Alan Pevec |
23a31e5 |
BuildRequires: python-netifaces
|
|
Alan Pevec |
bff93be |
BuildRequires: python-debtcollector
|
|
Alan Pevec |
adb05a9 |
BuildRequires: python-oslo-i18n
|
|
Alan Pevec |
adb05a9 |
BuildRequires: python-netaddr
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
%description -n python-%{pkg_name}-doc
|
|
Alan Pevec |
23a31e5 |
Documentation for the Oslo Utility library.
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
%package -n python-%{pkg_name}-tests
|
|
|
764dfae |
Summary: Tests for the Oslo Utility library
|
|
|
764dfae |
|
|
|
764dfae |
Requires: python-%{pkg_name} = %{version}-%{release}
|
|
|
764dfae |
Requires: python-hacking
|
|
|
764dfae |
Requires: python-fixtures
|
|
|
764dfae |
Requires: python-oslotest
|
|
|
764dfae |
Requires: python-testscenarios
|
|
|
764dfae |
Requires: python-testtools
|
|
|
764dfae |
Requires: python-testrepository
|
|
|
764dfae |
|
|
|
764dfae |
%description -n python-%{pkg_name}-tests
|
|
|
764dfae |
Tests for the Oslo Utility library.
|
|
|
764dfae |
|
|
|
c2a3905 |
%if 0%{?with_python3}
|
|
|
6462f15 |
%package -n python3-%{pkg_name}-tests
|
|
|
6462f15 |
Summary: Tests for the Oslo Utility library
|
|
|
6462f15 |
|
|
|
6462f15 |
Requires: python3-%{pkg_name} = %{version}-%{release}
|
|
|
6462f15 |
Requires: python3-hacking
|
|
|
6462f15 |
Requires: python3-fixtures
|
|
|
6462f15 |
Requires: python3-oslotest
|
|
|
6462f15 |
Requires: python3-testscenarios
|
|
|
6462f15 |
Requires: python3-testtools
|
|
|
6462f15 |
Requires: python3-testrepository
|
|
|
6462f15 |
|
|
|
6462f15 |
%description -n python3-%{pkg_name}-tests
|
|
|
6462f15 |
Tests for the Oslo Utility library.
|
|
|
6462f15 |
%endif
|
|
|
6462f15 |
|
|
|
6462f15 |
%if 0%{?with_python3}
|
|
|
764dfae |
%package -n python3-%{pkg_name}
|
|
|
c2a3905 |
Summary: OpenStack Oslo Utility library
|
|
|
764dfae |
%{?python_provide:%python_provide python3-%{pkg_name}}
|
|
|
c2a3905 |
|
|
|
c2a3905 |
BuildRequires: python3-devel
|
|
|
c2a3905 |
BuildRequires: python3-pbr
|
|
|
c2a3905 |
|
|
|
764dfae |
# test requirements
|
|
|
764dfae |
BuildRequires: python3-hacking
|
|
|
764dfae |
BuildRequires: python3-fixtures
|
|
|
764dfae |
BuildRequires: python3-oslo-config
|
|
|
764dfae |
BuildRequires: python3-oslotest
|
|
|
764dfae |
BuildRequires: python3-testscenarios
|
|
|
764dfae |
BuildRequires: python3-testtools
|
|
|
764dfae |
BuildRequires: python3-testrepository
|
|
|
764dfae |
BuildRequires: python3-funcsigs
|
|
|
764dfae |
|
|
|
764dfae |
Requires: python3-funcsigs
|
|
|
c2a3905 |
Requires: python3-oslo-config
|
|
|
c2a3905 |
Requires: python3-oslo-i18n
|
|
|
c2a3905 |
Requires: python3-babel
|
|
|
c2a3905 |
Requires: python3-iso8601
|
|
|
c2a3905 |
Requires: python3-six >= 1.9.0
|
|
|
c2a3905 |
Requires: python3-netaddr >= 0.7.12
|
|
|
c2a3905 |
Requires: python3-netifaces >= 0.10.4
|
|
|
c2a3905 |
Requires: python3-debtcollector >= 0.3.0
|
|
|
c2a3905 |
Requires: python3-pytz
|
|
|
c2a3905 |
Requires: python3-monotonic
|
|
|
f5880e5 |
Requires: python-%{pkg_name}-lang = %{version}-%{release}
|
|
|
c2a3905 |
|
|
|
764dfae |
%description -n python3-%{pkg_name}
|
|
|
c2a3905 |
The OpenStack Oslo Utility library.
|
|
|
c2a3905 |
* Documentation: http://docs.openstack.org/developer/oslo.utils
|
|
|
c2a3905 |
* Source: http://git.openstack.org/cgit/openstack/oslo.utils
|
|
|
c2a3905 |
* Bugs: http://bugs.launchpad.net/oslo
|
|
|
c2a3905 |
%endif
|
|
|
c2a3905 |
|
|
|
f5880e5 |
%package -n python-%{pkg_name}-lang
|
|
|
f5880e5 |
Summary: Translation files for Oslo utils library
|
|
|
f5880e5 |
|
|
|
f5880e5 |
%description -n python-%{pkg_name}-lang
|
|
|
f5880e5 |
Translation files for Oslo utils library
|
|
|
f5880e5 |
|
|
Alan Pevec |
8ff2bad |
%prep
|
|
Alan Pevec |
adb05a9 |
%setup -q -n %{pypi_name}-%{upstream_version}
|
|
Alan Pevec |
b5a2e8e |
|
|
Alan Pevec |
8ff2bad |
# Let RPM handle the dependencies
|
|
Alan Pevec |
adb05a9 |
rm -f {test-,}requirements.txt
|
|
Alan Pevec |
8ff2bad |
|
|
Alan Pevec |
8ff2bad |
%build
|
|
|
764dfae |
%py2_build
|
|
Alan Pevec |
8ff2bad |
|
|
Alan Pevec |
8ff2bad |
# generate html docs
|
|
Alan Pevec |
8ff2bad |
sphinx-build doc/source html
|
|
Alan Pevec |
8ff2bad |
# remove the sphinx-build leftovers
|
|
Alan Pevec |
8ff2bad |
rm -rf html/.{doctrees,buildinfo}
|
|
Alan Pevec |
8ff2bad |
|
|
|
f5880e5 |
# Generate i18n files
|
|
|
f5880e5 |
%{__python2} setup.py compile_catalog -d build/lib/oslo_utils/locale
|
|
|
f5880e5 |
|
|
|
c2a3905 |
%if 0%{?with_python3}
|
|
|
764dfae |
%py3_build
|
|
|
c2a3905 |
%endif
|
|
Alan Pevec |
8ff2bad |
|
|
Alan Pevec |
8ff2bad |
%install
|
|
|
764dfae |
%py2_install
|
|
|
764dfae |
%if 0%{?with_python3}
|
|
|
764dfae |
%py3_install
|
|
|
764dfae |
%endif
|
|
Alan Pevec |
8ff2bad |
|
|
|
f5880e5 |
# Install i18n .mo files (.po and .pot are not required)
|
|
|
f5880e5 |
install -d -m 755 %{buildroot}%{_datadir}
|
|
|
f5880e5 |
rm -f %{buildroot}%{python2_sitelib}/oslo_utils/locale/*/LC_*/oslo_utils*po
|
|
|
f5880e5 |
rm -f %{buildroot}%{python2_sitelib}/oslo_utils/locale/*pot
|
|
|
f5880e5 |
mv %{buildroot}%{python2_sitelib}/oslo_utils/locale %{buildroot}%{_datadir}/locale
|
|
|
f5880e5 |
%if 0%{?with_python3}
|
|
|
f5880e5 |
rm -rf %{buildroot}%{python3_sitelib}/oslo_utils/locale
|
|
|
f5880e5 |
%endif
|
|
|
f5880e5 |
|
|
|
f5880e5 |
# Find language files
|
|
|
f5880e5 |
%find_lang oslo_utils --all-name
|
|
|
f5880e5 |
|
|
|
f5880e5 |
|
|
|
764dfae |
%check
|
|
|
c2a3905 |
%if 0%{?with_python3}
|
|
|
764dfae |
%{__python3} setup.py test
|
|
|
c2a3905 |
%endif
|
|
|
764dfae |
%{__python2} setup.py test
|
|
Alan Pevec |
8ff2bad |
|
|
|
764dfae |
%files -n python2-%{pkg_name}
|
|
Alan Pevec |
bff93be |
%doc README.rst
|
|
Alan Pevec |
bff93be |
%license LICENSE
|
|
Alan Pevec |
23a31e5 |
%{python2_sitelib}/oslo_utils
|
|
Alan Pevec |
8ff2bad |
%{python2_sitelib}/*.egg-info
|
|
|
764dfae |
%exclude %{python2_sitelib}/oslo_utils/tests
|
|
Alan Pevec |
8ff2bad |
|
|
|
c2a3905 |
%if 0%{?with_python3}
|
|
|
764dfae |
%files -n python3-%{pkg_name}
|
|
|
c2a3905 |
%doc README.rst
|
|
|
c2a3905 |
%license LICENSE
|
|
|
c2a3905 |
%{python3_sitelib}/oslo_utils
|
|
|
c2a3905 |
%{python3_sitelib}/*.egg-info
|
|
|
764dfae |
%exclude %{python3_sitelib}/oslo_utils/tests
|
|
|
764dfae |
%endif
|
|
|
c2a3905 |
|
|
|
764dfae |
%files -n python-%{pkg_name}-doc
|
|
|
c2a3905 |
%doc html
|
|
|
c2a3905 |
%license LICENSE
|
|
Alan Pevec |
c4aade8 |
|
|
|
764dfae |
%files -n python-%{pkg_name}-tests
|
|
|
764dfae |
%{python2_sitelib}/oslo_utils/tests
|
|
|
db17997 |
|
|
|
f5880e5 |
%files -n python-%{pkg_name}-lang -f oslo_utils.lang
|
|
|
44ce036 |
%license LICENSE
|
|
|
f5880e5 |
|
|
|
6462f15 |
%if 0%{?with_python3}
|
|
|
6462f15 |
%files -n python3-%{pkg_name}-tests
|
|
|
6462f15 |
%{python3_sitelib}/oslo_utils/tests
|
|
|
6462f15 |
%endif
|
|
|
6462f15 |
|
|
|
764dfae |
%changelog
|
|
|
44ce036 |
* Wed Feb 08 2017 Alfredo Moralejo <amoralej@redhat.com> 3.22.0-1
|
|
|
44ce036 |
- Update to 3.22.0
|
|
Alan Pevec |
af2b3af |
|