From f3a71b890086da13730a41251ff6d6c6cc31ec6e7161217b4a5df113a3c01a4d Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Fri, 29 Sep 2023 16:40:56 +0000 Subject: [PATCH] Accepting request 1114417 from home:bnavigator:branches:Application:ERP:GNUHealth:Factory second submit because I didn't supersede - Back to singlespec for a single flavor in order to use sle15_python_module_pythons OBS-URL: https://build.opensuse.org/request/show/1114417 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/mygnuhealth?expand=0&rev=33 --- mygnuhealth.changes | 6 +++++ mygnuhealth.spec | 60 ++++++++++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 25 deletions(-) diff --git a/mygnuhealth.changes b/mygnuhealth.changes index 4d8039b..61b90e7 100644 --- a/mygnuhealth.changes +++ b/mygnuhealth.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Sep 29 16:31:48 UTC 2023 - Ben Greiner + +- Back to singlespec for a single flavor in order to + use sle15_python_module_pythons + ------------------------------------------------------------------- Fri Sep 29 16:13:11 UTC 2023 - Ben Greiner diff --git a/mygnuhealth.spec b/mygnuhealth.spec index 499969c..a62b532 100644 --- a/mygnuhealth.spec +++ b/mygnuhealth.spec @@ -23,6 +23,14 @@ #boo#1181905 %global __requires_exclude qmlimport\\((BloodPressure|FedLogin|GHBio|GHBol|GHPsycho|Glucose|LocalAccountManager|MoodEnergy|NetworkSettings|Osat|ProfileSettings|Weight|PoL|GHLifestyle|GHPhysicalActivity|GHNutrition|GHSleep|GHAbout) +%if %{?suse_version} > 1500 +# only the primary one for TW +%define pythons python3 +%else +# needs Python 3.9+ +%{?sle15_python_module_pythons} +%endif + Name: mygnuhealth Version: %{majorver}.0.0 Release: 0 @@ -37,33 +45,35 @@ Source2: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=he ## Patch1: doc_path.diff # SECTION build BuildRequires: fdupes -BuildRequires: python3-wheel -BuildRequires: python3-setuptools >= 61 -BuildRequires: python3-pip +BuildRequires: %{python_module wheel} +BuildRequires: %{python_module setuptools >= 61} +BuildRequires: %{python_module pip} BuildRequires: update-desktop-files BuildRequires: python-rpm-macros # /SECTION # SECTION test requirements # there are no tests, but at least check that all the runtime requirements are available on build time -BuildRequires: python3-bcrypt -BuildRequires: python3-Kivy -BuildRequires: python3-pygal -BuildRequires: python3-tinydb -BuildRequires: python3-requests -BuildRequires: python3-CairoSVG +BuildRequires: %{python_module bcrypt} +BuildRequires: %{python_module Kivy} +BuildRequires: %{python_module pygal} +BuildRequires: %{python_module tinydb} +BuildRequires: %{python_module requests} +BuildRequires: %{python_module CairoSVG} # DO NOT SUBMIT TO FACTORY UNTIL THIS IS PATCHED to tinycss2 or old obsolete tinycss is back -#BuildRequires: python3-tinycss -BuildRequires: python3-cssselect -Requires: python3-bcrypt -Requires: python3-Kivy -Requires: python3-pygal -Requires: python3-tinydb -Requires: python3-requests -Requires: python3-CairoSVG -Requires: python3-tinycss -Requires: python3-cssselect +#BuildRequires: %%{python_module tinycss} +BuildRequires: %{python_module cssselect} +Requires: python-bcrypt +Requires: python-Kivy +Requires: python-pygal +Requires: python-tinydb +Requires: python-requests +Requires: python-CairoSVG +Requires: python-tinycss +Requires: python-cssselect # /SECTION BuildArch: noarch +# singlespec rewriter for exactly one python (see above) +%python_subpackages %description The Personal Health Information Management System for Desktop and Mobile Devices @@ -81,19 +91,19 @@ Information Management System for Desktop and Mobile Devices %autosetup -p1 -n %{name} %build -%python3_pyproject_wheel +%pyproject_wheel %install -%python3_pyproject_install +%pyproject_install # remove shebang -sed -i '1{/env python/d}' %{buildroot}%{python3_sitelib}/mygnuhealth/*.py +%python_expand sed -i '1{/env python/d}' %{buildroot}%{python_sitelib}/mygnuhealth/*.py # menu-entry desktop-file-install --dir %{buildroot}%{_datadir}/applications org.gnuhealth.mygnuhealth.desktop %suse_update_desktop_file org.gnuhealth.mygnuhealth -%fdupes %{buildroot}%{python3_sitelib} +%python_expand %fdupes %{buildroot}%{python_sitelib} # install and deduplicate doc mkdir -p %{buildroot}%{_docdir}/%{name}-doc/ @@ -112,8 +122,8 @@ rm -rf /home/*/.cache/mygnuhealth %attr(755,root,root) %{_bindir}/%{name} %{_datadir}/applications/org.gnuhealth.mygnuhealth.desktop %license COPYRIGHT LICENSE -%{python3_sitelib}/mygnuhealth -%{python3_sitelib}/mygnuhealth-%{version}.dist-info +%{python_sitelib}/mygnuhealth +%{python_sitelib}/mygnuhealth-%{version}.dist-info %files -n %{name}-doc