Blob Blame History Raw
%global pypi_name opentracing-python

Summary:        OpenTracing interface for Python
Name:           python-opentracing
Version:        2.4.0
Release:        2%{?dist}
# The files are under the Apache License 2.0,
# except for:
# - mocktracer-related files
# - scope-related files
# - tests/conftest.py
# which are under the Expat License (classified as MIT by the Open
# Source Initiative).
License:        ASL 2.0 and MIT
URL:            https://github.com/opentracing/%{pypi_name}
Source0:        https://github.com/opentracing/%{pypi_name}/archive/%{version}.tar.gz

# Issue filed upstream as https://github.com/opentracing/opentracing-python/issues/142
# Upstream has merged the change on master as https://github.com/opentracing/opentracing-python/pull/143
Patch0:         0001-Do-not-use-mock-the-PyPI-backport-library-when-possi.patch

BuildArch:      noarch
BuildRequires:  python3-devel
BuildRequires:  python3dist(setuptools)
BuildRequires:  texinfo
BuildRequires:  make
BuildRequires:  python3-sphinx
BuildRequires:  python3-sphinx_rtd_theme
BuildRequires:  python3-pytest
BuildRequires:  python3-pytest-cov
BuildRequires:  python3-gevent
BuildRequires:  python3-tornado
# Required to provide its intersphinx inventory
BuildRequires:  python3-docs

%global _description %{expand:
This library is a Python platform API for OpenTracing.

It allows Python programs to interact with an OpenTracing server.}

%description
%{_description}

%prep
%autosetup -n %{pypi_name}-%{version} -p1

%build
%{py3_build}

# Reconfigure intersphinx to use the local inventory.
sed -e '/^ \+.python.:/s,None,"%{_docdir}/python3-docs/html/objects.inv",' -i docs/conf.py
# Generate the documentation.
%__make -O V=1 VERBOSE=1 -C docs info html PYTHONPATH=..
# Remove non-documentation
rm -rf docs/_build/html/{.buildinfo,_sources}

%install
%{py3_install}
mkdir -p %{buildroot}%{_infodir}
cp -p docs/_build/texinfo/%{pypi_name}.info %{buildroot}%{_infodir}/

%check
%__make test

%package -n python3-opentracing
Summary: %{summary}

%description -n python3-opentracing
%{_description}

%files -n python3-opentracing
%license LICENSE
%doc README.rst
%doc CHANGELOG.rst
%{python3_sitelib}/opentracing/
%{python3_sitelib}/opentracing-*.egg-info
%{_infodir}/%{pypi_name}.info*

%package doc
Summary: %{summary} - HTML documentation

%description doc
%{_description}

This package contains the documentation in HTML.

%files doc
%doc docs/_build/html/
%license LICENSE

%changelog
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

* Thu Dec 10 2020 Fabrice BAUZAC <noon@mykolab.com> 2.4.0-1
- Initial version.