From 94fd07ae0ac660858deb1e99e61ca5a2f9c68cc5c1f0832904c1075b50eb0138 Mon Sep 17 00:00:00 2001 From: Axel Braun Date: Mon, 15 Jan 2024 22:30:53 +0000 Subject: [PATCH] - sitch to wheel and %{?sle15_python_module_pythons} OBS-URL: https://build.opensuse.org/package/show/Application:ERP:GNUHealth:Factory/trytond_product?expand=0&rev=28 --- trytond_product.changes | 5 +++++ trytond_product.spec | 28 +++++++++++++++++++++------- 2 files changed, 26 insertions(+), 7 deletions(-) diff --git a/trytond_product.changes b/trytond_product.changes index 55b69a7..be4b156 100644 --- a/trytond_product.changes +++ b/trytond_product.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Mon Jan 15 22:29:52 UTC 2024 - Axel Braun + +- sitch to wheel and %{?sle15_python_module_pythons} + ------------------------------------------------------------------- Thu Oct 19 11:39:07 UTC 2023 - Daniel Garcia Moreno diff --git a/trytond_product.spec b/trytond_product.spec index e6b0c3b..14a2de4 100644 --- a/trytond_product.spec +++ b/trytond_product.spec @@ -1,8 +1,8 @@ # # spec file for package trytond_product # -# Copyright (c) 2023 SUSE LLC -# Copyright (c) 2014-2022 Dr. Axel Braun +# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2014-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 @@ -17,6 +17,16 @@ # +%if 0%{?suse_version} >= 1550 +%define pythons python3 +%define mypython python3 +%define mysitelib %python3_sitelib +%else +%{?sle15_python_module_pythons} +%define mypython %pythons +%define mysitelib %{expand:%%%{mypython}_sitelib} +%endif + %define majorver 6.0 Name: trytond_product Version: %{majorver}.4 @@ -28,9 +38,13 @@ URL: http://www.tryton.org/ Source: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz Source2: http://downloads.tryton.org/%{majorver}/%{name}-%{version}.tar.gz.asc Source3: https://keybase.io/cedrickrier/pgp_keys.asc?fingerprint=7C5A4360F6DF81ABA91FD54D6FF50AFE03489130#/%{name}.keyring +BuildRequires: %{mypython}-devel +BuildRequires: %{mypython}-pip +BuildRequires: %{mypython}-setuptools +BuildRequires: %{mypython}-wheel BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: python3-setuptools + Requires: trytond BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -44,14 +58,14 @@ Product Template, Product and Product Category. %setup -q %build -%python3_build +%pyproject_wheel %install -%python3_install -%fdupes -s %{buildroot} +%pyproject_install +%python_expand %fdupes %{buildroot}%{mysitelib} %files %defattr(-,root,root) -%{python3_sitelib}/* +%{mysitelib}/tryton* %changelog