From f7b0cdbe5e0a5d71d2b02af13b9cf014f1294a3fe2153e0f4019983c4337386e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Thu, 21 Jan 2021 15:01:55 +0000 Subject: [PATCH] Accepting request 865449 from home:mcalabkova:branches:devel:languages:python - Fix build with python36 OBS-URL: https://build.opensuse.org/request/show/865449 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-buttplug?expand=0&rev=6 --- python-buttplug.changes | 5 +++++ python-buttplug.spec | 13 +++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/python-buttplug.changes b/python-buttplug.changes index 84b5e7d..cd3f1e5 100644 --- a/python-buttplug.changes +++ b/python-buttplug.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jan 21 14:55:46 UTC 2021 - Markéta Machová + +- Fix build with python36 + ------------------------------------------------------------------- Sun Nov 22 08:46:29 UTC 2020 - andy great diff --git a/python-buttplug.spec b/python-buttplug.spec index b38b0b6..1e79654 100644 --- a/python-buttplug.spec +++ b/python-buttplug.spec @@ -1,7 +1,7 @@ # # spec file for package python-buttplug # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} %define skip_python2 1 %define packagename buttplug-py Name: python-buttplug @@ -26,18 +27,18 @@ License: BSD-3-Clause URL: https://github.com/buttplugio/buttplug-py/ Source: https://github.com/buttplugio/buttplug-py/archive/%{version}.tar.gz#/%{packagename}-%{version}.tar.gz BuildRequires: %{python_module pytest >= 4.0} -BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module setuptools} BuildRequires: %{python_module websockets >= 7.0} BuildRequires: fdupes BuildRequires: python-rpm-macros -Requires: python-setuptools +BuildRequires: ((python3-dataclasses and python3-base < 3.7) or (python36-dataclasses and python36-base)) Requires: python-websockets BuildArch: noarch -%if 0%{?suse_version} <= 1520 -BuildRequires: %{python_module dataclasses} +%if 0%{?suse_version} >= 1550 +# pytest-asyncio needs pytest6 now +BuildRequires: %{python_module pytest-asyncio} %endif -%if 0%{?suse_version} <= 1520 +%if 0%{?python_version_nodots} < 37 Requires: python-dataclasses %endif %python_subpackages