File python-opencensus.spec of Package python-opencensus

#
# spec file for package python-opencensus
#
# Copyright (c) 2019 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/


%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-opencensus
Version:        0.7.5
Release:        0
License:        Apache-2.0
Summary:        A stats collection and distributed tracing framework
Url:            https://github.com/census-instrumentation/opencensus-python
Group:          Development/Languages/Python
Source:         https://github.com/census-instrumentation/opencensus-python/archive/v%{version}.tar.gz#/opencensus-%{version}.tar.gz
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module setuptools}
# SECTION test requirements
BuildRequires:  %{python_module Flask}
BuildRequires:  %{python_module google-api-core >= 1.0.0}
BuildRequires:  %{python_module google-cloud-trace}
BuildRequires:  %{python_module mock}
BuildRequires:  %{python_module opencensus-context == 0.1.1}
BuildRequires:  %{python_module pytest}
BuildRequires:  %{python_module retrying}
BuildRequires:  python2-unittest2
# /SECTION
BuildRequires:  unzip
BuildRequires:  fdupes
Requires:       python-google-api-core >= 1.0.0
Requires:       python-opencensus-context == 0.1.1
BuildArch:      noarch

%python_subpackages

%description
A stats collection and distributed tracing framework.

%prep
%setup -q -n opencensus-python-%{version}

# Requires extra modules
rm tests/system/stats/prometheus/prometheus_stats_test.py \
   tests/system/stats/stackdriver/stackdriver_stats_test.py

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%check
# Ignore tests under contrib/
%pytest tests/

%files %{python_files}
%license LICENSE
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by