14
0
forked from pool/python-pylint
Files
python-pylint/python-pylint.spec
Markéta Machová f63e1b4b88 Accepting request 999571 from home:bnavigator:branches:devel:languages:python
- Update to version 2.15.0
  * In pylint 2.15.0, we added a new check missing-timeout to warn
    of default timeout values that could cause a program to be
    hanging indefinitely.
  * We improved pylint's handling of namespace packages. More
    packages should be linted without resorting to using the
    --recursive=y option.
- Release highlights from 2.14
  * With 2.14 pylint only supports Python version 3.7.2 and above.
  * We introduced several new checks among which duplicate-value
    for sets, comparison-of-constants, and checks related to
    lambdas. We removed no-init and made no-self-use optional as
    they were too opinionated. We also added an option to generate
    a toml configuration: --generate-toml-config.
  * We migrated to argparse from optparse and refactored the
    configuration handling thanks to Daniël van Noord. On the user
    side it should change the output of the --help command, and
    some inconsistencies and bugs should disappear. The behavior
    between options set in a config file versus on the command line
    will be more consistent. For us, it will permit to maintain
    this part of the code easily in the future and anticipate
    optparse's removal in Python 3.12.
  * As a result of the refactor there are a lot of internal
    deprecations. If you're a library maintainer that depends on
    pylint, please verify that you're ready for pylint 3.0 by
    activating deprecation warnings.
  * We continued the integration of pylint-error and are now at
    33%!. We still welcome any community effort to help review,
    integrate, and add good/bad examples
    <https://github.com/PyCQA/pylint/issues/5953>`_. This should be
    doable without any pylint or astroid knowledge, so this is the
    perfect entrypoint if you want to contribute to pylint or open
    source without any experience with our code!
- Release highlights from 2.13
  * In 2.13, we introduced a new check to deal with unicode
    security issues. On top of that a lot of work was done inside
    the unicode checker by @CarliJoy. We also introduced a new
    check when importing private name and for unnecessary ellipsis
    among other.
  * We fixed long standing issues related to duplicate code that
    could not be disabled, line numbers that were not accurate some
    of the time, and added the ability to lint all files in a
    directory without specifying each one. One of the most
    anticipated issue from the repository. Thank you @matusvalo !
  * A lot of undefined-variables and used-before-assignment issues
    were resolved thanks to @jacobtylerwalls.
  * We started integrating pylint-error the documentation created
    by @vald-phoenix a developer from Hlyniane, Ukraine. We hope
    he's doing well despite the current situation. The deployment
    is set up but there's still a lot to do so we welcome any
    community effort help to review, integrate, and add good/bad
    examples. This should be doable without any pylint or astroid
    knowledge, so this is the perfect entrypoint if you want to
    contribute to pylint without investing any time learning the
    internals.
  * This release is the last one to support interpreter below
    3.7.2, 3.6 end of life was reached in december 2021.
- Add pylint-pr7367-pythonpathtest.patch
  * gh#PyCQA/pylint#7367

OBS-URL: https://build.opensuse.org/request/show/999571
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pylint?expand=0&rev=129
2022-09-04 08:48:58 +00:00

132 lines
4.6 KiB
RPMSpec

#
# spec file for package python-pylint
#
# Copyright (c) 2022 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/
#
%bcond_without tests
Name: python-pylint
Version: 2.15.0
Release: 0
Summary: Syntax and style checker for Python code
License: GPL-2.0-or-later
Group: Development/Languages/Python
URL: https://github.com/pycqa/pylint
# Tests are no longer packaged in the PyPI sdist, use GitHub archive
Source: https://github.com/PyCQA/pylint/archive/refs/tags/v%{version}.tar.gz#/pylint-%{version}-gh.tar.gz
# PATCH-FIX-UPSTREAM gh#PyCQA/pylint#7367
Patch0: pylint-pr7367-pythonpathtest.patch
BuildRequires: %{python_module base >= 3.7.2}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-dill >= 0.2
Requires: python-platformdirs >= 2.2
Requires: python-tomlkit >= 0.10.1
Requires: (python-astroid >= 2.12.4 with python-astroid < 2.14.0~dev0)
Requires: (python-isort >= 4.2.5 with python-isort < 6)
Requires: (python-mccabe >= 0.6 with python-mccabe < 0.8)
%if 0%{?python_version_nodots} < 311
Requires: python-tomli >= 1.1.0
%endif
%if 0%{?python_version_nodots} < 310
Requires: python-typing-extensions >= 3.10
%endif
%if %{with tests}
# SECTION pylint deps
BuildRequires: %{python_module astroid >= 2.12.4 with %python-astroid < 2.14.0~dev0}
BuildRequires: %{python_module dill >= 0.2}
BuildRequires: %{python_module isort >= 4.2.5 with %python-isort < 6}
BuildRequires: %{python_module mccabe >= 0.6 with %python-mccabe < 0.8}
BuildRequires: %{python_module platformdirs >= 2.2}
BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11}
BuildRequires: %{python_module tomlkit >= 0.10.1}
# typing-extensions for python310 required for tests only, same as gh#PyCQA/astroid#1585
BuildRequires: %{python_module typing-extensions >= 3.10}
# /SECTION
# SECTION test deps
BuildRequires: %{python_module GitPython > 3}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest-xdist}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
# /SECTION
%endif
Requires(post): update-alternatives
Requires(postun):update-alternatives
BuildArch: noarch
%python_subpackages
%description
Pylint analyzes Python source code looking for bugs and signs of poor
quality.
Pylint is a python tool that checks if a module satisfies a coding
standard. Pylint can be seen as another PyChecker since nearly all
tests you can do with PyChecker can also be done with Pylint. But
Pylint offers some more features, like checking line-code's length,
checking if variable names are well-formed according to your coding
standard, or checking if declared interfaces are truly implemented, and
much more (see the complete check list).
The big advantage with Pylint is that it is highly configurable,
customizable, and you can easily write a small plugin to add a personal
feature.
%prep
%autosetup -p1 -n pylint-%{version}
sed -i '1{/^#!/ d}' pylint/__main__.py
%build
export LC_ALL="en_US.UTF-8"
%pyproject_wheel
%install
export LC_ALL="en_US.UTF-8"
%pyproject_install
for p in pylint epylint pyreverse symilar pylint-config ; do
%python_clone -a %{buildroot}%{_bindir}/$p
done
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%if %{with tests}
%check
export LC_ALL="en_US.UTF-8"
%pytest --benchmark-disable
%endif
%post
%python_install_alternative pylint epylint pyreverse symilar pylint-config
%postun
%python_uninstall_alternative pylint
%files %{python_files}
%license LICENSE
%doc README.rst
%doc examples/
%python_alternative %{_bindir}/pylint
%python_alternative %{_bindir}/pylint-config
%python_alternative %{_bindir}/epylint
%python_alternative %{_bindir}/pyreverse
%python_alternative %{_bindir}/symilar
%{python_sitelib}/pylint/
%{python_sitelib}/pylint-%{version}*-info
%changelog