forked from pool/python-cpplint
deprecated usage of sre_compile gh#cpplint/cpplint#214 - Update to 1.6.1 * Fix #195 Fix post increment/decrement operator causing a false positive. * Fix #202 .hh files should not be considered sytem headers * Fix #207 Python2 incompatibility for loading CPPLINT.cfg file * Fix #184 NOLINT(clang-analyzer) comments should not cause warnings - 1.6.0 (2022-02-19) * Fix #188: "Include the directory when naming header files" also for header files with other names like "*.hpp" - 1.5.5 (2021-05-20) * Fix #172: Added 'size_t' to typecasts detected by CheckCStyleCast * Fixed wrong CLI help text: Each filter needs + or - * Fix #164: add elif as an exception for CheckSpacingForFunctionCall() * Fix google#346: --root option not working on windows due to slashes in path OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cpplint?expand=0&rev=12
77 lines
2.4 KiB
RPMSpec
77 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-cpplint
|
|
#
|
|
# Copyright (c) 2023 SUSE LLC
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
Name: python-cpplint
|
|
Version: 1.6.1
|
|
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 drop-sre-compile.patch gh#cpplint/cpplint#214
|
|
Patch0: drop-sre-compile.patch
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module testfixtures}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires(post): update-alternatives
|
|
Requires(postun):update-alternatives
|
|
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}
|
|
sed -i -e '/^#!\//, 1d' cpplint.py
|
|
sed -i 's/pytest-runner==5.2//' setup.py
|
|
sed -i 's/pytest-cov//' test-requirements
|
|
sed -i 's/--cov-fail-under=75 --cov=cpplint//' setup.cfg
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_clone -a %{buildroot}%{_bindir}/cpplint
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%post
|
|
%python_install_alternative cpplint
|
|
|
|
%postun
|
|
%python_uninstall_alternative cpplint
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc README.rst
|
|
%python_alternative %{_bindir}/cpplint
|
|
%{python_sitelib}/cpplint*
|
|
%pycache_only %{python_sitelib}/__pycache__
|
|
|
|
%changelog
|