From 91724d773ace05037b3cc6e789093342ff9afc120543fde053e4ba842c2c434b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mark=C3=A9ta=20Machov=C3=A1?= Date: Tue, 10 Jun 2025 12:40:05 +0000 Subject: [PATCH] - Convert to pip-based build and libalternatives OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-python-aiml?expand=0&rev=12 --- python-python-aiml.changes | 5 +++++ python-python-aiml.spec | 27 +++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/python-python-aiml.changes b/python-python-aiml.changes index e3505a7..982085d 100644 --- a/python-python-aiml.changes +++ b/python-python-aiml.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jun 10 12:38:37 UTC 2025 - Markéta Machová + +- Convert to pip-based build and libalternatives + ------------------------------------------------------------------- Tue Jun 1 18:15:22 UTC 2021 - Matej Cepl diff --git a/python-python-aiml.spec b/python-python-aiml.spec index 96a1c3f..8528691 100644 --- a/python-python-aiml.spec +++ b/python-python-aiml.spec @@ -1,7 +1,7 @@ # # spec file for package python-python-aiml # -# 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 Name: python-python-aiml Version: 0.9.3 Release: 0 @@ -24,13 +24,15 @@ Summary: An interpreter package for AIML, the Artificial Intelligence Mar License: BSD-2-Clause URL: https://github.com/paulovn/python-aiml Source: https://files.pythonhosted.org/packages/source/p/python-aiml/python-aiml-%{version}.zip +BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: alts BuildRequires: fdupes BuildRequires: python-rpm-macros BuildRequires: unzip +Requires: alts Requires: python-setuptools -Requires(post): update-alternatives -Requires(postun):update-alternatives Provides: python-aiml = %{version}-%{release} Obsoletes: python-aiml < 0.9.0 BuildArch: noarch @@ -48,10 +50,10 @@ for a long time. %setup -q -n python-aiml-%{version} %build -%python_build +%pyproject_wheel %install -%python_install +%pyproject_install %python_clone -a %{buildroot}%{_bindir}/aiml-bot %python_clone -a %{buildroot}%{_bindir}/aiml-validate %python_expand %fdupes %{buildroot}%{$python_sitelib} @@ -59,19 +61,16 @@ for a long time. %check %pyunittest discover -v -%post -%python_install_alternative aiml-bot -%python_install_alternative aiml-validate - -%postun -%python_uninstall_alternative aiml-bot -%python_uninstall_alternative aiml-validate +%pre +%python_libalternatives_reset_alternative aiml-bot +%python_libalternatives_reset_alternative aiml-validate %files %{python_files} %doc CHANGES.txt README.rst %license COPYING.txt %python_alternative %{_bindir}/aiml-validate %python_alternative %{_bindir}/aiml-bot -%{python_sitelib}/* +%{python_sitelib}/aiml +%{python_sitelib}/python[-_]aiml-%{version}*-info %changelog