# This is to avoid this error: # error: Empty %%files file /builddir/build/BUILD/opentracing-python-2.4.0/debugsourcefiles.list %global debug_package %{nil} %global pypi_name opentracing-python Summary: OpenTracing interface for Python Name: python-opentracing Version: 2.4.0 Release: 1%{?dist} License: ASL 2.0 URL: https://github.com/opentracing/%{pypi_name} Source0: https://github.com/opentracing/%{pypi_name}/archive/%{version}.tar.gz BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-sphinx BuildRequires: python3-sphinx_rtd_theme BuildRequires: texinfo BuildRequires: python3-rpm-macros BuildRequires: python3-pytest BuildRequires: python3-pytest-cov BuildRequires: python3-mock BuildRequires: python3-gevent BuildRequires: python3-tornado %global _description %{expand: This library is a Python platform API for OpenTracing. It allows Python programs to interact with an OpenTracing server.} %description %{_description} %package -n python3-opentracing Summary: %{summary} BuildArch: noarch Requires(post): info Requires(preun): info %description -n python3-opentracing %{_description} %prep %autosetup -n %{pypi_name}-%{version} %build %{py3_build} # Generate the Info documentation. %{__make} -C docs info PYTHONPATH=.. %install %{py3_install} mkdir -p %{buildroot}%{_infodir} cp docs/_build/texinfo/%{pypi_name}.info %{buildroot}%{_infodir}/ rm -f %{buildroot}/%{_infodir}/dir %check %{__make} test %post -n python3-opentracing /sbin/install-info %{_infodir}/%{pypi_name}.info %{_infodir}/dir || : %preun -n python3-opentracing if [ $1 = 0 ] ; then /sbin/install-info --delete %{_infodir}/%{pypi_name}.info %{_infodir}/dir || : fi %files -n python3-opentracing %license LICENSE %doc README.rst %doc CHANGELOG.rst %{python3_sitelib}/opentracing/ %{python3_sitelib}/opentracing-*.egg-info %{_infodir}/%{pypi_name}.info.gz %changelog * Thu Dec 10 2020 Fabrice BAUZAC 2.4.0-1 - Initial package.