Blob Blame Raw
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
# Created by pyp2rpm-1.1.0b
%global pypi_name osprofiler
%global with_doc 0


Name:           python-%{pypi_name}
Version:        1.11.0
Release:        7%{?dist}
Summary:        OpenStack Profiler Library

License:        ASL 2.0
URL:            http://www.openstack.org/
Source0:        https://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
BuildArch:      noarch

BuildRequires:  git

%description
OSProfiler is an OpenStack cross-project profiling library.

%if 0%{?with_doc}
%package doc
Summary:    Documentation for the OpenStack Profiler Library

BuildRequires:  python3-sphinx
BuildRequires:  python3-openstackdocstheme

%description doc
Documentation for the OpenStack Profiler Library
%endif


%package -n python3-%{pypi_name}
Summary:    OpenStack Profiler Library
%{?python_provide:%python_provide python3-%{pypi_name}}

BuildRequires:  python3-devel
BuildRequires:  python3-setuptools
BuildRequires:  python3-pbr

Requires:       python3-netaddr
Requires:       python3-oslo-concurrency >= 3.8.0
Requires:       python3-oslo-log >= 3.11.0
Requires:       python3-oslo-messaging >= 5.2.0
Requires:       python3-oslo-utils >= 3.16.0
Requires:       python3-requests
Requires:       python3-six
Requires:       python3-webob

%description -n python3-%{pypi_name}
OSProfiler is an OpenStack cross-project profiling library.


%prep
%autosetup -n %{pypi_name}-%{upstream_version} -S git
# Let RPM handle the dependencies
rm -f requirements.txt
# Remove bundled egg-info
rm -rf %{pypi_name}.egg-info

%build
%py3_build

%if 0%{?with_doc}
# generate html docs
# python3 setup.py build_sphinx -b html
# remove the sphinx-build leftovers
# rm -rf doc/build/html/.{doctrees,buildinfo}
%endif

%install
%py3_install

%if 0%{?with_doc}
%files doc
%doc doc/build/html
%license LICENSE
%endif

%files -n python3-%{pypi_name}
%doc README.rst
%license LICENSE
%{_bindir}/osprofiler
%{python3_sitelib}/%{pypi_name}
%{python3_sitelib}/%{pypi_name}-*.egg-info

%changelog
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild

* Wed Jan 09 2019 Miro Hrončok <mhroncok@redhat.com> - 1.11.0-6
- Subpackage python2-osprofiler has been removed
  See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal

* Sat Jul 14 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild

* Tue Jun 19 2018 Miro Hrončok <mhroncok@redhat.com> - 1.11.0-4
- Rebuilt for Python 3.7

* Tue Feb 27 2018 Iryna Shcherbina <ishcherb@redhat.com> - 1.11.0-3
- Update Python 2 dependency declarations to new packaging standards
  (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3)

* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild

* Mon Aug 14 2017 Alfredo Moralejo <amoralej@redhat.com> 1.11.0-1
- Update to 1.11.0