From 4ac49432674890da37c9f029158d73b214dc28b6242534e37c9a3e8c337697c0 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 11 May 2020 08:04:16 +0000 Subject: [PATCH 1/2] Accepting request 801883 from home:andythe_great - Add patch for use dataclasses when needed - Add dataclasses module as dependency for Leap. OBS-URL: https://build.opensuse.org/request/show/801883 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screeninfo?expand=0&rev=4 --- python-screeninfo.changes | 7 +++++++ python-screeninfo.spec | 7 +++++++ use_dataclasses_when_needed.patch | 12 ++++++++++++ 3 files changed, 26 insertions(+) create mode 100644 use_dataclasses_when_needed.patch diff --git a/python-screeninfo.changes b/python-screeninfo.changes index 4ed06a2..982d648 100644 --- a/python-screeninfo.changes +++ b/python-screeninfo.changes @@ -1,7 +1,14 @@ +------------------------------------------------------------------- +Thu May 7 15:14:56 UTC 2020 - andy great + +- Add Use dataclasses when needed patch. +- Add python-dataclasses for leap. + ------------------------------------------------------------------- Fri Apr 24 03:22:54 UTC 2020 - andy great - Update to version 0.6.5 + * No changelog was made available. ------------------------------------------------------------------- Thu Dec 26 15:19:57 UTC 2019 - Luigi Baldoni diff --git a/python-screeninfo.spec b/python-screeninfo.spec index 47d036b..d6ade89 100644 --- a/python-screeninfo.spec +++ b/python-screeninfo.spec @@ -16,6 +16,7 @@ # +%define skip_python2 1 %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-screeninfo Version: 0.6.5 @@ -24,7 +25,12 @@ Summary: Fetch location and size of physical screens License: MIT URL: https://github.com/rr-/screeninfo Source0: https://github.com/rr-/screeninfo/archive/%{version}.tar.gz#/screeninfo-%{version}.tar.gz +# PATCH-FIX-UPSTREAM https://github.com/rr-/screeninfo/pull/36 -- Use dataclass when needed +Patch0: use_dataclasses_when_needed.patch BuildRequires: %{python_module setuptools} +%if 0%{?suse_version} <= 1500 +BuildRequires: %{python_module dataclasses} +%endif BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch @@ -35,6 +41,7 @@ Python module to fetch location and size of physical screens. %prep %setup -q -n screeninfo-%{version} +%patch0 -p1 %build %python_build diff --git a/use_dataclasses_when_needed.patch b/use_dataclasses_when_needed.patch new file mode 100644 index 0000000..64375b2 --- /dev/null +++ b/use_dataclasses_when_needed.patch @@ -0,0 +1,12 @@ +diff -ruN a/setup.py b/setup.py +--- a/setup.py 2020-04-15 15:13:07.000000000 +0100 ++++ b/setup.py 2020-04-30 02:38:18.000000000 +0100 +@@ -11,7 +11,7 @@ + keywords=["screen", "monitor", "desktop"], + classifiers=[], + install_requires=[ +- "dataclasses", ++ "dataclasses ; python_version<'3.7'", + 'Cython ; sys_platform=="darwin"', + 'pyobjus ; sys_platform=="darwin"', + ], From aee59af2ece95f813c79a8cc7e5da77bc6bb1c4c891a3415d974bf21ad354208 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Mon, 11 May 2020 09:56:07 +0000 Subject: [PATCH 2/2] Fix changes OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-screeninfo?expand=0&rev=5 --- python-screeninfo.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python-screeninfo.changes b/python-screeninfo.changes index 982d648..8a3d436 100644 --- a/python-screeninfo.changes +++ b/python-screeninfo.changes @@ -1,7 +1,7 @@ ------------------------------------------------------------------- Thu May 7 15:14:56 UTC 2020 - andy great -- Add Use dataclasses when needed patch. +- Add use_dataclasses_when_needed.patch patch. - Add python-dataclasses for leap. -------------------------------------------------------------------