Compare commits

4 Commits

2 changed files with 23 additions and 12 deletions

View File

@@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Jul 7 09:42:55 UTC 2025 - Markéta Machová <mmachova@suse.com>
- Convert to libalternatives
-------------------------------------------------------------------
Mon Jun 16 06:12:19 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
- Switch to pyroject macros.
------------------------------------------------------------------- -------------------------------------------------------------------
Tue Feb 20 19:11:15 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com> Tue Feb 20 19:11:15 UTC 2024 - Daniel Garcia <daniel.garcia@suse.com>

View File

@@ -1,7 +1,7 @@
# #
# spec file for package python-cpplint # spec file for package python-cpplint
# #
# Copyright (c) 2024 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,6 +16,7 @@
# #
%bcond_without libalternatives
Name: python-cpplint Name: python-cpplint
Version: 1.6.1 Version: 1.6.1
Release: 0 Release: 0
@@ -29,13 +30,15 @@ Patch0: drop-sre-compile.patch
Patch1: python312.patch Patch1: python312.patch
# PATCH-FIX-UPSTREAM deprecated-unittest-aliases.patch gh#cpplint/cpplint#182 # PATCH-FIX-UPSTREAM deprecated-unittest-aliases.patch gh#cpplint/cpplint#182
Patch2: deprecated-unittest-aliases.patch Patch2: deprecated-unittest-aliases.patch
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest} BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools} BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testfixtures} BuildRequires: %{python_module testfixtures}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: python-rpm-macros BuildRequires: python-rpm-macros
Requires(post): update-alternatives Requires: alts
Requires(postun): update-alternatives
BuildArch: noarch BuildArch: noarch
%python_subpackages %python_subpackages
@@ -54,27 +57,25 @@ sed -i 's/pytest-cov//' test-requirements
sed -i 's/--cov-fail-under=75 --cov=cpplint//' setup.cfg sed -i 's/--cov-fail-under=75 --cov=cpplint//' setup.cfg
%build %build
%python_build %pyproject_wheel
%install %install
%python_install %pyproject_install
%python_clone -a %{buildroot}%{_bindir}/cpplint %python_clone -a %{buildroot}%{_bindir}/cpplint
%python_expand %fdupes %{buildroot}%{$python_sitelib} %python_expand %fdupes %{buildroot}%{$python_sitelib}
%check %check
%pytest %pytest
%post %pre
%python_install_alternative cpplint %python_libalternatives_reset_alternative cpplint
%postun
%python_uninstall_alternative cpplint
%files %{python_files} %files %{python_files}
%license LICENSE %license LICENSE
%doc README.rst %doc README.rst
%python_alternative %{_bindir}/cpplint %python_alternative %{_bindir}/cpplint
%{python_sitelib}/cpplint* %{python_sitelib}/cpplint.py
%pycache_only %{python_sitelib}/__pycache__ %pycache_only %{python_sitelib}/__pycache__/cpplint.*.pyc
%{python_sitelib}/cpplint-%{version}.dist-info
%changelog %changelog