17
0

1 Commits

Author SHA256 Message Date
afb502ec5a Convert to libalternatives, bsc#1245883 2025-11-03 15:13:13 +01:00
2 changed files with 32 additions and 4 deletions

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Aug 26 09:48:09 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives on SLE-16-based and newer systems
-------------------------------------------------------------------
Mon Jun 30 10:54:06 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>
- Switch build system from setuptools to pyproject.toml
* Add python-pip and python-wheel to BuildRequires
* Replace %python_build with %pyproject_wheel
* Replace %python_install with %pyproject_install
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Mar 18 12:03:00 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com> Tue Mar 18 12:03:00 UTC 2025 - John Paul Adrian Glaubitz <adrian.glaubitz@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-yamllint # spec file for package python-yamllint
# #
# 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,6 +16,11 @@
# #
%if 0%{?suse_version} > 1500
%bcond_without libalternatives
%else
%bcond_with libalternatives
%endif
%{?sle15_python_module_pythons} %{?sle15_python_module_pythons}
Name: python-yamllint Name: python-yamllint
Version: 1.36.2 Version: 1.36.2
@@ -26,14 +31,21 @@ Group: Development/Languages/Python
URL: https://github.com/adrienverge/yamllint URL: https://github.com/adrienverge/yamllint
Source: https://files.pythonhosted.org/packages/source/y/yamllint/yamllint-%{version}.tar.gz Source: https://files.pythonhosted.org/packages/source/y/yamllint/yamllint-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.8} BuildRequires: %{python_module base >= 3.8}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires: python-PyYAML Requires: python-PyYAML
Requires: python-pathspec >= 0.5.3 Requires: python-pathspec >= 0.5.3
BuildArch: noarch
%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
# SECTION test requirements # SECTION test requirements
BuildRequires: %{python_module PyYAML} BuildRequires: %{python_module PyYAML}
BuildRequires: %{python_module pathspec >= 0.5.3} BuildRequires: %{python_module pathspec >= 0.5.3}
@@ -53,10 +65,10 @@ indentation, etc.
sed 's/ setuptools/ setuptools; python_version < "3.8"/' setup.cfg sed 's/ setuptools/ setuptools; python_version < "3.8"/' setup.cfg
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%python_clone -a %{buildroot}%{_bindir}/yamllint %python_clone -a %{buildroot}%{_bindir}/yamllint
@@ -72,6 +84,9 @@ export GITHUB_RUN_ID=1
%postun %postun
%python_uninstall_alternative yamllint %python_uninstall_alternative yamllint
%pre
%python_libalternatives_reset_alternative yamllint
%files %{python_files} %files %{python_files}
%doc README.rst %doc README.rst
%license LICENSE %license LICENSE