From 18e0564356bebf1fba01bad2bde6ddca3618606ec00489f0f227ee3c58982537 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Fri, 22 Jan 2021 13:49:20 +0000 Subject: [PATCH] Accepting request 866014 from home:bnavigator:branches:devel:languages:python - aiocontextvars is only needed for older Python 3.6. Python 3.7 and beyond provide everything in stdlib contextvars. See upstreams' setup.cfg. Use rpm boolean dependencies to pull in aiocontextvars only for python36 if available (TW) or python3 if python3-base < 3.7 (Leap) OBS-URL: https://build.opensuse.org/request/show/866014 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-opentelemetry-api?expand=0&rev=9 --- python-opentelemetry-api.changes | 9 +++++++++ python-opentelemetry-api.spec | 5 ++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/python-opentelemetry-api.changes b/python-opentelemetry-api.changes index e4d715b..67c9eb8 100644 --- a/python-opentelemetry-api.changes +++ b/python-opentelemetry-api.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Jan 22 13:40:17 UTC 2021 - Benjamin Greiner + +- aiocontextvars is only needed for older Python 3.6. Python 3.7 + and beyond provide everything in stdlib contextvars. See + upstreams' setup.cfg. Use rpm boolean dependencies to pull in + aiocontextvars only for python36 if available (TW) or python3 if + python3-base < 3.7 (Leap) + ------------------------------------------------------------------- Fri Jan 22 11:39:19 UTC 2021 - John Paul Adrian Glaubitz diff --git a/python-opentelemetry-api.spec b/python-opentelemetry-api.spec index 12aecb1..04ff446 100644 --- a/python-opentelemetry-api.spec +++ b/python-opentelemetry-api.spec @@ -25,12 +25,15 @@ Summary: OpenTelemetry Python API License: Apache-2.0 URL: https://github.com/open-telemetry/opentelemetry-python/tree/master/opentelemetry-api Source: https://files.pythonhosted.org/packages/source/o/opentelemetry-api/opentelemetry-api-%{version}.tar.gz -BuildRequires: %{python_module aiocontextvars} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: ((python3-aiocontextvars and python3-base < 3.7) or (python36-aiocontextvars and python36-base)) BuildArch: noarch Requires: python-setuptools +%if %{python_version_nodots} < 37 +Requires: python-aiocontextvars +%endif # SECTION test requirements BuildRequires: %{python_module pytest} # /SECTION