From 0b58fd14b829a490b77964862fcb10f864386c6c5284533961fbcdadbcf4e5c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 10 Jun 2025 08:06:51 +0000 Subject: [PATCH] - Convert to pip-based build and libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pykwalify?expand=0&rev=13 --- python-pykwalify.changes | 5 +++++ python-pykwalify.spec | 24 ++++++++++++------------ 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/python-pykwalify.changes b/python-pykwalify.changes index 462f28f..22c003a 100644 --- a/python-pykwalify.changes +++ b/python-pykwalify.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 10 08:03:27 UTC 2025 - Markéta Machová + +- Convert to pip-based build and libalternatives + ------------------------------------------------------------------- Thu Mar 21 07:55:17 UTC 2024 - Max Lin diff --git a/python-pykwalify.spec b/python-pykwalify.spec index 007540a..88e515f 100644 --- a/python-pykwalify.spec +++ b/python-pykwalify.spec @@ -1,7 +1,7 @@ # # spec file for package python-pykwalify # -# Copyright (c) 2021 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%{**} python3-%{**}} +%bcond_without libalternatives %{?sle15_python_module_pythons} Name: python-pykwalify Version: 1.8.0 @@ -26,15 +26,17 @@ License: MIT Group: Development/Languages/Python URL: https://github.com/grokzen/pykwalify Source: https://files.pythonhosted.org/packages/source/p/pykwalify/pykwalify-%{version}.tar.gz +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: alts Requires: python-PyYAML >= 3.11 Requires: python-docopt >= 0.6.2 Requires: python-python-dateutil >= 2.4.2 Requires: python-ruamel.yaml >= 0.16.0 -Requires(post): update-alternatives -Requires(postun):update-alternatives Suggests: python-ruamel.yaml >= 0.11.0 BuildArch: noarch # SECTION test requirements @@ -58,26 +60,24 @@ The schema this library is base and extended from: http://www.kuwata-lab.com/kwa %setup -q -n pykwalify-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/pykwalify %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pyunittest discover -v -%post -%python_install_alternative pykwalify - -%postun -%python_uninstall_alternative pykwalify +%pre +%python_libalternatives_reset_alternative pykwalify %files %{python_files} %doc README.md %license LICENSE %python_alternative %{_bindir}/pykwalify -%{python_sitelib}/* +%{python_sitelib}/pykwalify +%{python_sitelib}/pykwalify-%{version}*-info %changelog