forked from pool/python-pycodestyle
- Convert to libalternatives on SLE-16-based and newer systems only
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pycodestyle?expand=0&rev=49
This commit is contained in:
@@ -1,3 +1,8 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Aug 21 16:12:39 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
- Convert to libalternatives on SLE-16-based and newer systems only
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sat Jul 19 07:30:53 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
Sat Jul 19 07:30:53 UTC 2025 - Markéta Machová <mmachova@suse.com>
|
||||||
|
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# spec file for package python-pycodestyle
|
# spec file for package python-pycodestyle
|
||||||
#
|
#
|
||||||
# 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
|
||||||
@@ -16,7 +16,11 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1500
|
||||||
%bcond_without libalternatives
|
%bcond_without libalternatives
|
||||||
|
%else
|
||||||
|
%bcond_with libalternatives
|
||||||
|
%endif
|
||||||
%{?sle15_python_module_pythons}
|
%{?sle15_python_module_pythons}
|
||||||
Name: python-pycodestyle
|
Name: python-pycodestyle
|
||||||
Version: 2.14.0
|
Version: 2.14.0
|
||||||
@@ -30,13 +34,18 @@ BuildRequires: %{python_module pip}
|
|||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
BuildRequires: %{python_module wheel}
|
BuildRequires: %{python_module wheel}
|
||||||
BuildRequires: alts
|
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
Requires: alts
|
|
||||||
Provides: python-pep8 = %{version}
|
Provides: python-pep8 = %{version}
|
||||||
Obsoletes: python-pep8 < %{version}
|
Obsoletes: python-pep8 < %{version}
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with libalternatives}
|
||||||
|
BuildRequires: alts
|
||||||
|
Requires: alts
|
||||||
|
%else
|
||||||
|
Requires(post): update-alternatives
|
||||||
|
Requires(postun): update-alternatives
|
||||||
|
%endif
|
||||||
%python_subpackages
|
%python_subpackages
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@@ -59,6 +68,12 @@ sed -ri '1s/^#!.*//' pycodestyle.py
|
|||||||
%python_clone -a %{buildroot}%{_bindir}/pycodestyle
|
%python_clone -a %{buildroot}%{_bindir}/pycodestyle
|
||||||
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
|
%python_expand %fdupes %{buildroot}/%{$python_sitelib}
|
||||||
|
|
||||||
|
%post
|
||||||
|
%python_install_alternative pycodestyle
|
||||||
|
|
||||||
|
%postun
|
||||||
|
%python_uninstall_alternative pycodestyle
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
%python_libalternatives_reset_alternative pycodestyle
|
%python_libalternatives_reset_alternative pycodestyle
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user