forked from pool/python-ansi2html
- Convert to libalternatives
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-ansi2html?expand=0&rev=18
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-ansi2html
|
||||
#
|
||||
# Copyright (c) 2024 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,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%bcond_without libalternatives
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-ansi2html
|
||||
Version: 1.9.2
|
||||
@@ -29,10 +30,10 @@ BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module pytest}
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: alts
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun): update-alternatives
|
||||
Requires: alts
|
||||
BuildArch: noarch
|
||||
%python_subpackages
|
||||
|
||||
@@ -61,11 +62,8 @@ sed -i 's:from mock:from unittest.mock:' tests/test_ansi2html.py
|
||||
# but it runs just ansi2html --version
|
||||
%pytest -k 'not test_command_script'
|
||||
|
||||
%post
|
||||
%python_install_alternative ansi2html
|
||||
|
||||
%postun
|
||||
%python_uninstall_alternative ansi2html
|
||||
%pre
|
||||
%python_libalternatives_reset_alternative ansi2html
|
||||
|
||||
%files %{python_files}
|
||||
%license LICENSE
|
||||
|
||||
Reference in New Issue
Block a user