File project.diff of Package gpgme
--- gpgme.spec.orig
+++ gpgme.spec
@@ -1,7 +1,7 @@
#
-# spec file
+# spec file for package gpgme
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -67,10 +67,12 @@ BuildRequires: python-rpm-macros
BuildRequires: pkgconfig(Qt5Core)
BuildRequires: pkgconfig(Qt5Test)
%endif
-%if 0%{?suse_version} >= 1550
-# TW: generate subpackages for every python3 flavor
+%if 0%{?suse_version} >= 1500
+# Generate subpackages for every python3 flavor
+%if %{with python2} || %{with python3}
%define python_subpackage_only 1
%python_subpackages
+%endif
%else
%define python_sitearch %python3_sitearch
%define python_files() -n python3-%{**}