forked from pool/python-pylint
- Convert to libalternatives on SLE-16-based and newer systems
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=175
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Aug 25 09:53:38 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu May 15 08:56:07 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
Thu May 15 08:56:07 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pylint
|
# spec file for package python-pylint
|
||||||
#
|
#
|
||||||
# Copyright (c) 2025 SUSE LLC
|
# Copyright (c) 2025 SUSE LLC and contributors
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -17,6 +17,11 @@
|
|||||||
|
|
||||||
|
|
||||||
%bcond_without tests
|
%bcond_without tests
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pylint
|
Name: python-pylint
|
||||||
Version: 3.3.7
|
Version: 3.3.7
|
||||||
@@ -38,6 +43,7 @@ Requires: python-tomlkit >= 0.10.1
|
|||||||
Requires: (python-astroid >= 3.3.8 with python-astroid < 4.0.0~dev0)
|
Requires: (python-astroid >= 3.3.8 with python-astroid < 4.0.0~dev0)
|
||||||
Requires: (python-isort >= 4.2.5 with python-isort < 7)
|
Requires: (python-isort >= 4.2.5 with python-isort < 7)
|
||||||
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
|
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
|
||||||
|
BuildArch: noarch
|
||||||
%if 0%{?python_version_nodots} < 311
|
%if 0%{?python_version_nodots} < 311
|
||||||
Requires: python-tomli >= 1.1.0
|
Requires: python-tomli >= 1.1.0
|
||||||
%endif
|
%endif
|
||||||
@@ -65,9 +71,13 @@ BuildRequires: %{python_module pytest}
|
|||||||
BuildRequires: %{python_module requests}
|
BuildRequires: %{python_module requests}
|
||||||
# /SECTION
|
# /SECTION
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
Requires(post): update-alternatives
|
Requires(post): update-alternatives
|
||||||
Requires(postun): update-alternatives
|
Requires(postun): update-alternatives
|
||||||
BuildArch: noarch
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -100,6 +110,7 @@ export LC_ALL="en_US.UTF-8"
|
|||||||
for p in pylint pyreverse symilar pylint-config ; do
|
for p in pylint pyreverse symilar pylint-config ; do
|
||||||
%python_clone -a %{buildroot}%{_bindir}/$p
|
%python_clone -a %{buildroot}%{_bindir}/$p
|
||||||
done
|
done
|
||||||
|
%python_group_libalternatives pylint pyreverse symilar pylint-config
|
||||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
@@ -116,6 +127,9 @@ donttest+=" or test_functional"
|
|||||||
%pytest -n auto --ignore tests/benchmark --reruns 5 -rsfER -k "not ($donttest)"
|
%pytest -n auto --ignore tests/benchmark --reruns 5 -rsfER -k "not ($donttest)"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%pre
|
||||||
|
%python_libalternatives_reset_alternative pylint
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%python_install_alternative pylint pyreverse symilar pylint-config
|
%python_install_alternative pylint pyreverse symilar pylint-config
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user