14
0

Accepting request 1284445 from devel:languages:python

- Convert to pip-based build and libalternatives

OBS-URL: https://build.opensuse.org/request/show/1284445
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-python-aiml?expand=0&rev=6
This commit is contained in:
2025-06-11 14:23:05 +00:00
committed by Git OBS Bridge
2 changed files with 18 additions and 14 deletions

View File

@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Jun 10 12:38:37 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to pip-based build and libalternatives
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Jun 1 18:15:22 UTC 2021 - Matej Cepl <mcepl@suse.com> Tue Jun 1 18:15:22 UTC 2021 - Matej Cepl <mcepl@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-python-aiml # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # 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 Name: python-python-aiml
Version: 0.9.3 Version: 0.9.3
Release: 0 Release: 0
@@ -24,13 +24,15 @@ Summary: An interpreter package for AIML, the Artificial Intelligence Mar
License: BSD-2-Clause License: BSD-2-Clause
URL: https://github.com/paulovn/python-aiml URL: https://github.com/paulovn/python-aiml
Source: https://files.pythonhosted.org/packages/source/p/python-aiml/python-aiml-%{version}.zip 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 setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
BuildRequires: unzip BuildRequires: unzip
Requires: alts
Requires: python-setuptools Requires: python-setuptools
Requires(post): update-alternatives
Requires(postun):update-alternatives
Provides: python-aiml = %{version}-%{release} Provides: python-aiml = %{version}-%{release}
Obsoletes: python-aiml < 0.9.0 Obsoletes: python-aiml < 0.9.0
BuildArch: noarch BuildArch: noarch
@@ -48,10 +50,10 @@ for a long time.
%setup -q -n python-aiml-%{version} %setup -q -n python-aiml-%{version}
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/aiml-bot %python_clone -a %{buildroot}%{_bindir}/aiml-bot
%python_clone -a %{buildroot}%{_bindir}/aiml-validate %python_clone -a %{buildroot}%{_bindir}/aiml-validate
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
@@ -59,19 +61,16 @@ for a long time.
%check %check
%pyunittest discover -v %pyunittest discover -v
%post %pre
%python_install_alternative aiml-bot %python_libalternatives_reset_alternative aiml-bot
%python_install_alternative aiml-validate %python_libalternatives_reset_alternative aiml-validate
%postun
%python_uninstall_alternative aiml-bot
%python_uninstall_alternative aiml-validate
%files %{python_files} %files %{python_files}
%doc CHANGES.txt README.rst %doc CHANGES.txt README.rst
%license COPYING.txt %license COPYING.txt
%python_alternative %{_bindir}/aiml-validate %python_alternative %{_bindir}/aiml-validate
%python_alternative %{_bindir}/aiml-bot %python_alternative %{_bindir}/aiml-bot
%{python_sitelib}/* %{python_sitelib}/aiml
%{python_sitelib}/python[-_]aiml-%{version}*-info
%changelog %changelog