2021-06-28 12:53:04 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-pylint-ignore
|
|
|
|
#
|
2022-02-23 17:55:34 +00:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2021-06-28 12:53:04 +00:00
|
|
|
#
|
|
|
|
# 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/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
Name: python-pylint-ignore
|
2022-08-03 05:34:07 +00:00
|
|
|
Version: 2022.1025
|
2021-06-28 12:53:04 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Start with silence, not with noise But do start!
|
|
|
|
License: MIT
|
|
|
|
URL: https://github.com/mbarkhau/pylint-ignore
|
|
|
|
Source: https://files.pythonhosted.org/packages/source/p/pylint-ignore/pylint-ignore-%{version}.tar.gz
|
2022-08-03 05:34:07 +00:00
|
|
|
# PATCH-FIX-UPSTREAM gh#mbarkhau/pylint-ignore#15
|
|
|
|
Patch0: no-more-pathlib2.patch
|
2021-06-28 12:53:04 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2022-02-23 17:55:34 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2021-06-28 12:53:04 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pylev}
|
|
|
|
BuildRequires: %{python_module pylint > 2.4}
|
2022-02-23 17:55:34 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2021-06-28 12:53:04 +00:00
|
|
|
# /SECTION
|
|
|
|
BuildRequires: fdupes
|
2022-02-23 17:55:34 +00:00
|
|
|
Requires: python-astroid > 2.1.0
|
2021-06-28 12:53:04 +00:00
|
|
|
Requires: python-pylev
|
|
|
|
Requires: python-pylint > 2.4
|
2022-10-14 11:46:32 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun):update-alternatives
|
2021-06-28 12:53:04 +00:00
|
|
|
BuildArch: noarch
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
Start with silence, not with noise. But do start!
|
|
|
|
|
|
|
|
Pylint-ignore is a wrapper around Pylint that maintains a pylint-ignore.md file.
|
|
|
|
This file is used to ignore Pylint messages without adding comments to the
|
|
|
|
source code itself. It's similar to Rupocop's .rubocop_todo.yml.
|
|
|
|
|
|
|
|
%prep
|
2022-08-03 05:34:07 +00:00
|
|
|
%autosetup -p1 -n pylint-ignore-%{version}
|
2021-06-28 12:53:04 +00:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/pylint-ignore
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%python_expand sed -i 's,/usr/bin/env python,,' %{buildroot}%{$python_sitelib}/pylint_ignore/__main__.py
|
|
|
|
|
|
|
|
%check
|
2022-10-14 11:46:32 +00:00
|
|
|
# Ignore failing tests in python3.8 and python3.9
|
|
|
|
python38_donttest=(-k "not (test_selftest_no_ignore_update or test_selftest_ignore_update_noop)")
|
|
|
|
python39_donttest=(-k "not (test_selftest_no_ignore_update or test_selftest_ignore_update_noop)")
|
|
|
|
%pytest "${$python_donttest[@]}"
|
2021-06-28 12:53:04 +00:00
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative pylint-ignore
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative pylint-ignore
|
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%doc CHANGELOG.md README.md
|
|
|
|
%license LICENSE
|
|
|
|
%python_alternative %{_bindir}/pylint-ignore
|
2022-10-14 11:46:32 +00:00
|
|
|
%{python_sitelib}/pylint_ignore
|
|
|
|
%{python_sitelib}/pylint_ignore-%{version}*-info
|
2021-06-28 12:53:04 +00:00
|
|
|
|
|
|
|
%changelog
|