%global dlrn_nvr osprofiler-2.8.2-0.20190920064824.d431c7a %global dlrn 1 %define upstream_version 2.8.2 %{lua: posix.setenv("RHEL_ALLOW_PYTHON2_FOR_BUILD",1)} # Macros for py2/py3 compatibility %if 0%{?fedora} || 0%{?rhel} > 7 %global pyver %{python3_pkgversion} %else %global pyver 2 %endif %global pyver_bin python%{pyver} %global pyver_sitelib %python%{pyver}_sitelib %global pyver_install %py%{pyver}_install %global pyver_build %py%{pyver}_build # End of macros for py2/py3 compatibility %{!?upstream_version: %global upstream_version %{version}%{?milestone}} # Created by pyp2rpm-1.1.0b %global pypi_name osprofiler %global with_doc 0 %global common_desc OSProfiler is an OpenStack cross-project profiling library. Name: python-%{pypi_name} Version: 2.8.2 Release: 0.20190920064824.d431c7a%{?dist} Summary: OpenStack Profiler Library License: ASL 2.0 URL: http://www.openstack.org/ Source0: osprofiler-2.8.2-0.20190920064824.d431c7a.tar.gz # patches_base=d431c7a55153fc828ffa44dddd33d7d438e1ee3d # patches_ignore=DROP-IN-RPM BuildArch: noarch BuildRequires: git BuildRequires: python%{pyver}-devel BuildRequires: python%{pyver}-setuptools BuildRequires: python%{pyver}-pbr %description %{common_desc} %package -n python%{pyver}-%{pypi_name} Summary: OpenStack Profiler Library %{?python_provide:%python_provide python%{pyver}-%{pypi_name}} %if %{pyver} == 3 Obsoletes: python2-%{pypi_name} < %{version}-%{release} %endif Requires: python%{pyver}-oslo-concurrency >= 3.26.0 Requires: python%{pyver}-oslo-serialization >= 2.18.0 Requires: python%{pyver}-prettytable >= 0.7.2 Requires: python%{pyver}-oslo-messaging >= 5.2.0 Requires: python%{pyver}-oslo-utils >= 3.33.0 Requires: python%{pyver}-requests Requires: python%{pyver}-six Requires: python%{pyver}-netaddr Requires: python%{pyver}-webob %description -n python%{pyver}-%{pypi_name} %{common_desc} %if 0%{?with_doc} %package doc Summary: Documentation for the OpenStack Profiler Library Group: Documentation BuildRequires: python%{pyver}-sphinx BuildRequires: python%{pyver}-openstackdocstheme %description doc Documentation for the OpenStack Profiler Library %endif %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 %{pyver_build} %if 0%{?with_doc} # generate html docs %{pyver_bin} setup.py build_sphinx -b html # remove the sphinx-build-%{pyver} leftovers rm -rf doc/build/html/.{doctrees,buildinfo} %endif %install %{pyver_install} # Create a versioned binary for backwards compatibility until everything is pure py3 ln -s osprofiler %{buildroot}%{_bindir}/osprofiler-%{pyver} %files -n python%{pyver}-%{pypi_name} %doc README.rst %license LICENSE %{_bindir}/osprofiler %{_bindir}/osprofiler-%{pyver} %{pyver_sitelib}/%{pypi_name} %{pyver_sitelib}/%{pypi_name}-*.egg-info %if 0%{?with_doc} %files doc %doc doc/build/html %license LICENSE %endif %changelog * Fri Sep 20 2019 OSP Prod Chain 2.8.2-1 - Update patches * Fri Sep 20 2019 RDO 2.8.2-1 - Update to 2.8.2