# # spec file for package python-mccabe # # 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/ # %define skip_python36 1 %define skip_python38 1 %define skip_python39 1 %define skip_python311 1 %{?sle15_python_module_pythons} Name: python-mccabe Version: 0.7.0 Release: 2.3 Summary: McCabe checker, plugin for flake8 License: MIT Group: Development/Languages/Python URL: https://github.com/flintwork/mccabe Source: https://files.pythonhosted.org/packages/source/m/mccabe/mccabe-%{version}.tar.gz BuildRequires: %{python_module hypothesis} BuildRequires: %{python_module hypothesmith} BuildRequires: %{python_module pytest} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch %python_subpackages %description Ned's script to check McCabe complexity. This module provides a plugin for flake8, the Python code checker. %prep %setup -q -n mccabe-%{version} # do not require pytest-runner for setup sed -i 's:pytest-runner::' setup.py %build %python_build %install %python_install %python_expand %fdupes %{buildroot}%{$python_sitelib} %check %pytest %files %{python_files} %license LICENSE %doc README.rst %{python_sitelib}/* %changelog * Tue May 9 2023 Johannes Kastl - add sle15_python_module_pythons * Thu Aug 18 2022 Dirk Müller - update to 0.7.0: * Drop support for all versions of Python lower than 3.6 * Add support for Python 3.8, 3.9, and 3.10 * Fix option declaration for Flake8 * Wed Jul 3 2019 Tomáš Chvátal - Fix the test run with new pytest * Mon Mar 6 2017 jmatejek@suse.com - update for singlespec - enable tests * Mon Feb 20 2017 tbechtold@suse.com - Use pypi.io and https in Source * Wed Feb 15 2017 kkaempf@suse.com - update to version 0.6.1: * Fix signature for PathGraphingAstVisitor.default to match the signature for ASTVisitor - update to version 0.6.0: * Add support for Python 3.6 * Fix handling for missing statement types - update to version 0.5.3: * Report actual column number of violation instead of the start of the line - update to version 0.5.2: * When opening files ourselves, make sure we always name the file variable - update to version 0.5.1: * Set default maximum complexity to -1 on the class itself - update to version 0.5.0: * PyCon 2016 PDX release * Add support for Flake8 3.0 - update to version 0.4.0: * Stop testing on Python 3.2 * Add support for async/await keywords on Python 3.5 from PEP 0492 - update to version 0.3.1: * Include test_mccabe.py in releases. * Always coerce the max_complexity value from Flake8’s entry-point to an integer. * Thu May 7 2015 benoit.monin@gmx.fr - update to version 0.3: * Computation was wrong: the mccabe complexity starts at 1, not 2 * The max-complexity value is now inclusive. E.g.: if the value is 10 and the reported complexity is 10, then it passes * Add tests - add the LICENSE to the package documentation * Thu Oct 24 2013 speilicke@suse.com - Require python-setuptools instead of distribute (upstreams merged) * Tue Apr 23 2013 speilicke@suse.com - Fix SLE_11_SP2 build - Set license to MIT (SPDX mapping from Expat) * Sun Apr 21 2013 dmueller@suse.com - Initial package (0.2.1)