Files
python-cpplint/python-cpplint.spec
Steve Kowalik 326e8a8e1b - Update to 2.0.2:
* Drop Python 3.8
  * Don't err on non-const references by default
  * fix(indentation_namespace): false positive for MemInitLists
  * Fix missing comma between items in _CPP_HEADERS
  * Fix false positive for indented parameters in namespaces
  * IWYU: treat stdio.h the same way as cstdio
  * PEP 621: Migrate from setup.{py, cfg} to pyproject.toml
  * cpplint_clitest.py: Function names should be lowercase
  * suppress C++-only categories on C file extensions
  * You can now specify blocks of code that exclude linting with NOLINTBEGIN
    and NOLINTEND
  * The --filter option can now be only applied to a specific file or even a
    specific line through utilizing colons
  * NOLINT and NOLINTNEXTLINE comments now support a comma-separated list of
    categories
  * NOLINT and NOLINTNEXTLINE will now ignore categories known to be from
    clang-tidy
  * build/include-what-you-use no longer supports transitive headers from the
    header for the current module for parity with the style guide
  * build/include-what-you-use now supports a plethora of new functions
  * build/include-what-you-use will no longer err on similarly-named classes
    from other namespaces
  * Indented functions inside namespaces will now be correctly erred on
  * The check for C-style casts now looks for the standard fixed-width
    integer typenames instead of non-standard ones (e.g. int32_t instead of
    int32)
  * readability/braces will realize that C++20 concepts require a semicolon
  * C++20 headers will no longer be flagged as C headers
  * Processing C++ files through stdin/piping is now fixed

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cpplint?expand=0&rev=20
2025-10-31 02:28:31 +00:00

77 lines
2.4 KiB
RPMSpec

#
# spec file for package python-cpplint
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%bcond_without libalternatives
Name: python-cpplint
Version: 2.0.2
Release: 0
Summary: An automated checker to make sure a C++ file follows Google's C++ style guide
License: BSD-3-Clause
URL: https://github.com/cpplint/cpplint
Source: https://files.pythonhosted.org/packages/source/c/cpplint/cpplint-%{version}.tar.gz
# PATCH-FIX-UPSTREAM gh#cpplint/cpplint#405
Patch0: do-not-use-codecs-open.patch
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pytest-cov}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module testfixtures}
BuildRequires: %{python_module wheel}
BuildRequires: alts
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: alts
BuildArch: noarch
%python_subpackages
%description
This project continues the work of cpplint, a C++ style checker
following Google's C++ style guide. It provides cpplint as a PyPI
package and adds a few features and fixes. It is maintained as a
fork of google/styleguide (https://github.com/google/styleguide)
in hopes that it can be merged in the future.
%prep
%autosetup -p1 -n cpplint-%{version}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/cpplint
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%pytest
%pre
%python_libalternatives_reset_alternative cpplint
%files %{python_files}
%license LICENSE
%doc README.rst
%python_alternative %{_bindir}/cpplint
%{python_sitelib}/cpplint.py
%pycache_only %{python_sitelib}/__pycache__/cpplint.*.pyc
%{python_sitelib}/cpplint-%{version}.dist-info
%changelog