2018-05-24 20:56:57 +00:00
|
|
|
#
|
|
|
|
|
# spec file for package python-vulture
|
|
|
|
|
#
|
2025-06-24 02:57:07 +00:00
|
|
|
# Copyright (c) 2025 SUSE LLC
|
2018-05-24 20:56:57 +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.
|
|
|
|
|
|
2018-12-04 14:13:14 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2018-07-30 07:34:39 +00:00
|
|
|
#
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
|
2023-06-14 06:33:17 +00:00
|
|
|
%{?sle15_python_module_pythons}
|
2018-05-24 20:56:57 +00:00
|
|
|
Name: python-vulture
|
2024-11-05 15:34:16 +00:00
|
|
|
Version: 2.13
|
2018-05-24 20:56:57 +00:00
|
|
|
Release: 0
|
2018-07-30 07:34:39 +00:00
|
|
|
Summary: Python module for finding dead code
|
2018-05-24 20:56:57 +00:00
|
|
|
License: MIT
|
2019-02-11 05:48:55 +00:00
|
|
|
URL: https://github.com/jendrikseipp/vulture
|
2018-05-24 20:56:57 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/v/vulture/vulture-%{version}.tar.gz
|
2025-06-24 02:57:07 +00:00
|
|
|
BuildRequires: %{python_module pip}
|
2018-05-24 20:56:57 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2025-06-24 02:57:07 +00:00
|
|
|
BuildRequires: %{python_module wheel}
|
2018-05-24 20:56:57 +00:00
|
|
|
BuildRequires: fdupes
|
2018-07-30 07:34:39 +00:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-02-11 05:48:55 +00:00
|
|
|
Requires(post): update-alternatives
|
2025-06-24 02:57:07 +00:00
|
|
|
Requires(postun): update-alternatives
|
2019-02-11 05:48:55 +00:00
|
|
|
BuildArch: noarch
|
2018-05-24 20:56:57 +00:00
|
|
|
# SECTION test requirements
|
2019-02-11 05:48:55 +00:00
|
|
|
BuildRequires: %{python_module pytest > 3.2.3}
|
- update to 2.10:
* Drop support for Python 3.7 (Jendrik Seipp, #323).
* Add support for Python 3.12 (Jendrik Seipp, #332).
* Use `end_lineno` AST attribute to obtain more accurate line
counts (Jendrik Seipp).
* Use exit code 0 for `--help` and `--version` again (Jendrik
Seipp, #321).
* Use exit code 3 when dead code is found (whosayn, #319).
* Treat non-supported decorator names as "@" instead of
crashing (Llandy3d and Jendrik Seipp, #284).
* Drop support for Python 3.6 (Jendrik Seipp).
* Add `UnicodeEncodeError` exception handling to `core.py`
* Add whitelist for `Enum` attributes `_name_` and `_value_`
* Run tests and add PyPI trove for Python 3.11 (Jendrik Seipp).
* Ignore `setup_module()`, `teardown_module()`, etc. in pytest
`test_*.py` files (Jendrik Seipp).
* Add whitelist for
`socketserver.TCPServer.allow_reuse_address` (Ben Elliston).
* Clarify that `--exclude` patterns are matched against
absolute paths (Jendrik Seipp, #260).
* Add basic `match` statement support (kreathon, #276, #291).
* Mark imports in `__all__` as used (kreathon, #172, #282).
* Add whitelist for `pint.UnitRegistry.default_formatter` (Ben
Elliston, #258).
* Print absolute filepaths as relative again (as in version 2.1
and before)
* if they are below the current directory (The-Compiler, #246).
* Run tests and add PyPI trove for Python 3.10 (chayim, #266).
* Allow using the `del` keyword to mark unused variables
(sshishov, #279).
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-vulture?expand=0&rev=22
2023-12-27 16:54:52 +00:00
|
|
|
BuildRequires: %{python_module Pint}
|
2018-05-24 20:56:57 +00:00
|
|
|
# /SECTION
|
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Vulture finds unused code in Python programs. This is useful for
|
2018-07-30 07:34:39 +00:00
|
|
|
cleaning up and finding errors in code bases. Running Vulture
|
|
|
|
|
on both the library and test suite, untested code can be found.
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
Due to Python's dynamic nature, static code analyzers like Vulture are
|
|
|
|
|
likely to miss some dead code. Also, code that is only called implicitly
|
2018-07-30 07:34:39 +00:00
|
|
|
may be reported as unused.
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
Features:
|
|
|
|
|
|
2018-07-30 07:34:39 +00:00
|
|
|
* static code analysis
|
|
|
|
|
* only one module
|
|
|
|
|
* tests itself and has complete test coverage
|
2018-05-24 20:56:57 +00:00
|
|
|
* complements pyflakes and has the same output syntax
|
|
|
|
|
* sorts unused classes and functions by size with ``--sort-by-size``
|
|
|
|
|
* supports Python 2.6, 2.7 and 3.x
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n vulture-%{version}
|
2019-02-11 05:48:55 +00:00
|
|
|
sed -i -e '/^#! \//, 1d' vulture/core.py
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
%build
|
2025-06-24 02:57:07 +00:00
|
|
|
%pyproject_wheel
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
%install
|
2025-06-24 02:57:07 +00:00
|
|
|
%pyproject_install
|
2018-05-24 20:56:57 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/vulture
|
|
|
|
|
|
|
|
|
|
%check
|
2020-04-16 07:54:06 +00:00
|
|
|
rm setup.cfg
|
|
|
|
|
%pytest
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
%python_install_alternative vulture
|
|
|
|
|
|
|
|
|
|
%postun
|
|
|
|
|
%python_uninstall_alternative vulture
|
|
|
|
|
|
|
|
|
|
%files %{python_files}
|
2020-04-16 07:54:06 +00:00
|
|
|
%doc CHANGELOG.md README.md
|
2018-05-24 20:56:57 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
|
%python_alternative %{_bindir}/vulture
|
2025-06-24 02:57:07 +00:00
|
|
|
%{python_sitelib}/vulture
|
|
|
|
|
%{python_sitelib}/vulture-%{version}.dist-info
|
2018-05-24 20:56:57 +00:00
|
|
|
|
|
|
|
|
%changelog
|