From e69e0dc0e0ac76198f6af896d949c3ba681c16d34c9f03e8955d0fdf974df6a4 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Wed, 19 Jan 2022 12:49:10 +0000 Subject: [PATCH 1/3] OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth-thalamus?expand=0&rev=21 --- gnuhealth-thalamus.spec | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnuhealth-thalamus.spec b/gnuhealth-thalamus.spec index d52285d..4571039 100644 --- a/gnuhealth-thalamus.spec +++ b/gnuhealth-thalamus.spec @@ -1,8 +1,8 @@ # -# spec file for package gnuhealth-thalamus +# spec file # -# Copyright (c) 2021 SUSE LLC -# Copyright (c) 2017-2021 Dr. Axel Braun +# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2017-2022 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -34,6 +34,7 @@ BuildRequires: python3-devel BuildRequires: python3-setuptools %if %{with test} BuildRequires: python3-Flask +BuildRequires: python3-Flask-Cors BuildRequires: python3-Flask-HTTPAuth BuildRequires: python3-Flask-RESTful BuildRequires: python3-Flask-WTF From ee0cd4fab5eee2686f70e72dc3a5758cc42d73a169331e0e78da57da02e00a98 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Fri, 1 Mar 2024 16:28:49 +0000 Subject: [PATCH 2/3] Accepting request 1154114 from Application:ERP:GNUHealth:4.4 - switch to wheel, enable %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/request/show/1154114 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth-thalamus?expand=0&rev=22 --- gnuhealth-thalamus.changes | 5 ++++ gnuhealth-thalamus.spec | 61 ++++++++++++++++++++++---------------- 2 files changed, 40 insertions(+), 26 deletions(-) diff --git a/gnuhealth-thalamus.changes b/gnuhealth-thalamus.changes index 8390962..549a727 100644 --- a/gnuhealth-thalamus.changes +++ b/gnuhealth-thalamus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 22 10:11:10 UTC 2024 - Axel Braun + +- switch to wheel, enable %{?sle15_python_module_pythons} + ------------------------------------------------------------------- Thu Apr 8 12:34:35 UTC 2021 - Axel Braun diff --git a/gnuhealth-thalamus.spec b/gnuhealth-thalamus.spec index 4571039..ebf9ac7 100644 --- a/gnuhealth-thalamus.spec +++ b/gnuhealth-thalamus.spec @@ -1,8 +1,8 @@ # -# spec file +# spec file for package gnuhealth-thalamus # -# Copyright (c) 2022 SUSE LLC -# Copyright (c) 2017-2022 Dr. Axel Braun +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2017-2024 Dr. Axel Braun # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,6 +18,8 @@ %bcond_without test +%{?sle15_python_module_pythons} +%define skip_python39 1 %define modname thalamus Name: gnuhealth-%{modname} @@ -28,29 +30,36 @@ License: GPL-3.0-or-later Group: Development/Languages/Python URL: http://health.gnu.org Source: https://files.pythonhosted.org/packages/source/t/%{modname}/%{modname}-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes BuildRequires: postgresql-server BuildRequires: python-rpm-macros -BuildRequires: python3-devel -BuildRequires: python3-setuptools + %if %{with test} -BuildRequires: python3-Flask -BuildRequires: python3-Flask-Cors -BuildRequires: python3-Flask-HTTPAuth -BuildRequires: python3-Flask-RESTful -BuildRequires: python3-Flask-WTF -BuildRequires: python3-bcrypt -BuildRequires: python3-psycopg2 +BuildRequires: %{python_module Flask-Cors} +BuildRequires: %{python_module Flask-HTTPAuth} +BuildRequires: %{python_module Flask-RESTful} +BuildRequires: %{python_module Flask-WTF} +BuildRequires: %{python_module Flask} +BuildRequires: %{python_module bcrypt} +BuildRequires: %{python_module psycopg2} %endif -BuildRequires: fdupes -Requires: postgresql-server -Requires: python3-Flask -Requires: python3-Flask-HTTPAuth -Requires: python3-Flask-RESTful -Requires: python3-Flask-WTF -Requires: python3-bcrypt -Requires: python3-psycopg2 + +Requires: %{python_module Flask-HTTPAuth} +Requires: %{python_module Flask-RESTful} +Requires: %{python_module Flask-WTF} +Requires: %{python_module Flask} +Requires: %{python_module bcrypt} +Requires: %{python_module psycopg2} +# postgres may run on own cluster +Suggests: postgresql-server BuildArch: noarch +%python_subpackages + %description Thalamus: The GNU Health Federation Message and Authentication Server ===================================================================== @@ -72,19 +81,19 @@ Thalamus is part of the GNU Health project, but it is a self contained, independent server that can be used in different health related scenarios. %prep -%setup -q -n %{modname}-%{version} +%autosetup -n %{modname}-%{version} %build -python3 setup.py build +%pyproject_wheel %install -python3 setup.py install --prefix="%{_prefix}" --root=%{buildroot} -%fdupes %{buildroot}%{$python_sitelib} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} -%files +%files %{python_files} %defattr(-,root,root) %doc README.rst %license LICENSE -%{python3_sitelib}/* +%{python_sitelib}/* %changelog From 2de0634cf5ccac4e95aae101667d8aa977cdf886b9f46d1c173e68915cd1a296 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Sat, 2 Mar 2024 09:51:08 +0000 Subject: [PATCH 3/3] Accepting request 1154268 from Application:ERP:GNUHealth:4.4 - limit python build to latest python version OBS-URL: https://build.opensuse.org/request/show/1154268 OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/gnuhealth-thalamus?expand=0&rev=23 --- gnuhealth-thalamus.changes | 5 +++++ gnuhealth-thalamus.spec | 18 +++++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/gnuhealth-thalamus.changes b/gnuhealth-thalamus.changes index 549a727..06c10ed 100644 --- a/gnuhealth-thalamus.changes +++ b/gnuhealth-thalamus.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Mar 2 09:23:21 UTC 2024 - Axel Braun + +- limit python build to latest python version + ------------------------------------------------------------------- Mon Jan 22 10:11:10 UTC 2024 - Axel Braun diff --git a/gnuhealth-thalamus.spec b/gnuhealth-thalamus.spec index ebf9ac7..36c7587 100644 --- a/gnuhealth-thalamus.spec +++ b/gnuhealth-thalamus.spec @@ -17,9 +17,17 @@ # -%bcond_without test +%bcond_without test 1 + +%if 0%{?suse_version} >= 1550 +%define pythons python3 +%define mypython python3 +%define mysitelib %python3_sitelib +%else %{?sle15_python_module_pythons} -%define skip_python39 1 +%define mypython %pythons +%define mysitelib %{expand:%%%{mypython}_sitelib} +%endif %define modname thalamus Name: gnuhealth-%{modname} @@ -88,12 +96,12 @@ independent server that can be used in different health related scenarios. %install %pyproject_install -%python_expand %fdupes %{buildroot}%{$python_sitelib} +%python_expand %fdupes %{buildroot}%{mysitelib} -%files %{python_files} +%files %defattr(-,root,root) %doc README.rst %license LICENSE -%{python_sitelib}/* +%{mysitelib}/thalamus* %changelog