python-osprofiler/python-osprofiler.spec

134 lines
4.4 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-osprofiler
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: python-osprofiler
Version: 1.15.2
Release: 0
Summary: OpenStack Profiler Library
License: Apache-2.0
Group: Development/Languages/Python
Url: https://launchpad.net/osprofiler
Source0: https://files.pythonhosted.org/packages/source/o/osprofiler/osprofiler-1.15.2.tar.gz
BuildRequires: openstack-macros
BuildRequires: python-devel
BuildRequires: python2-WebOb >= 1.7.1
BuildRequires: python2-ceilometerclient >= 2.5.0
BuildRequires: python2-ddt >= 1.0.1
BuildRequires: python2-elasticsearch >= 2.0.0
BuildRequires: python2-mock >= 2.0.0
BuildRequires: python2-oslo.concurrency >= 3.25.0
BuildRequires: python2-oslo.config >= 5.1.0
BuildRequires: python2-oslo.log >= 3.36.0
BuildRequires: python2-oslo.utils >= 3.33.0
BuildRequires: python2-pymongo >= 3.0.2
BuildRequires: python2-python-subunit >= 1.0.0
BuildRequires: python2-redis >= 2.10.0
BuildRequires: python2-six >= 1.10.0
BuildRequires: python2-testrepository >= 0.0.18
BuildRequires: python2-testtools >= 2.2.0
BuildRequires: python3-WebOb >= 1.7.1
BuildRequires: python3-ceilometerclient >= 2.5.0
BuildRequires: python3-ddt >= 1.0.1
BuildRequires: python3-devel
BuildRequires: python3-elasticsearch >= 2.0.0
BuildRequires: python3-mock >= 2.0.0
BuildRequires: python3-oslo.concurrency >= 3.25.0
BuildRequires: python3-oslo.config >= 5.1.0
BuildRequires: python3-oslo.log >= 3.36.0
BuildRequires: python3-oslo.utils >= 3.33.0
BuildRequires: python3-pymongo >= 3.0.2
BuildRequires: python3-python-subunit >= 1.0.0
BuildRequires: python3-redis >= 2.10.0
BuildRequires: python3-six >= 1.10.0
BuildRequires: python3-testrepository >= 0.0.18
BuildRequires: python3-testtools >= 2.2.0
Requires: python-WebOb >= 1.7.1
Requires: python-oslo.concurrency >= 3.25.0
Requires: python-oslo.config >= 5.1.0
Requires: python-oslo.log >= 3.36.0
Requires: python-oslo.utils >= 3.33.0
Requires: python-six >= 1.10.0
BuildArch: noarch
%if 0%{?suse_version}
Requires(post): update-alternatives
Requires(postun): update-alternatives
%else
# on RDO, update-alternatives is in chkconfig
Requires(post): chkconfig
Requires(postun): chkconfig
%endif
%python_subpackages
%description
OSProfiler provides a tiny but powerful library that is used by
most (soon to be all) OpenStack projects and their python clients. It
provides functionality to be able to generate 1 trace per request, that goes
through all involved services. This trace can then be extracted and used
to build a tree of calls which can be quite handy for a variety of
reasons (for example in isolating cross-project performance issues).
%package -n python-osprofiler-doc
Summary: Documentation for OSProfiler
Group: Development/Languages/Python
BuildRequires: python-Sphinx
BuildRequires: python-openstackdocstheme >= 1.18.1
%description -n python-osprofiler-doc
Documentation for OSProfiler.
%prep
%autosetup -p1 -n osprofiler-1.15.2
%py_req_cleanup
sed -i 's/^warning-is-error.*/warning-is-error = 0/g' setup.cfg
%build
%{python_build}
%install
%{python_install}
%python_clone -a %{buildroot}%{_bindir}/osprofiler
# generate html docs
%{__python2} setup.py build_sphinx
# remove the sphinx-build leftovers
rm -rf doc/build/html/.{doctrees,buildinfo}
%post
%python_install_alternative osprofiler
%postun
%python_uninstall_alternative osprofiler
%check
%{python_expand rm -rf .testrepository
$python setup.py testr
}
%files %{python_files}
%license LICENSE
%doc README.rst ChangeLog
%{python_sitelib}/osprofiler
%{python_sitelib}/*.egg-info
%python_alternative %{_bindir}/osprofiler
%files -n python-osprofiler-doc
%license LICENSE
%doc doc/build/html
%changelog