forked from pool/python-radon
84 lines
2.5 KiB
RPMSpec
84 lines
2.5 KiB
RPMSpec
![]() |
#
|
||
|
# spec file for package python-radon
|
||
|
#
|
||
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
||
|
#
|
||
|
# 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 http://bugs.opensuse.org/
|
||
|
|
||
|
|
||
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||
|
Name: python-radon
|
||
|
Version: 2.2.0
|
||
|
Release: 0
|
||
|
License: MIT
|
||
|
Summary: Code Metrics in Python
|
||
|
Url: https://radon.readthedocs.org/
|
||
|
Group: Development/Languages/Python
|
||
|
Source: https://files.pythonhosted.org/packages/source/r/radon/radon-%{version}.tar.gz
|
||
|
BuildRequires: %{python_module devel}
|
||
|
BuildRequires: %{python_module setuptools}
|
||
|
BuildRequires: fdupes
|
||
|
BuildRequires: python-rpm-macros
|
||
|
# SECTION test requirements
|
||
|
BuildRequires: %{python_module colorama >= 0.3}
|
||
|
BuildRequires: %{python_module flake8-polyfill}
|
||
|
BuildRequires: %{python_module mando >= 0.6}
|
||
|
BuildRequires: %{python_module pytest >= 2.7}
|
||
|
BuildRequires: %{python_module pytest-mock}
|
||
|
# /SECTION
|
||
|
Requires: python-colorama >= 0.3
|
||
|
Requires: python-flake8-polyfill
|
||
|
Requires: python-mando >= 0.6
|
||
|
BuildArch: noarch
|
||
|
Requires(post): update-alternatives
|
||
|
Requires(postun): update-alternatives
|
||
|
|
||
|
%python_subpackages
|
||
|
|
||
|
%description
|
||
|
Radon is a Python tool that computes various metrics from the source code.
|
||
|
Radon can compute:
|
||
|
|
||
|
* McCabe's complexity**, i.e. cyclomatic complexity
|
||
|
* raw metrics (these include SLOC, comment lines, blank lines, &c.)
|
||
|
* Halstead metrics (all of them)
|
||
|
* Maintainability Index (the one used in Visual Studio)
|
||
|
|
||
|
%prep
|
||
|
%setup -q -n radon-%{version}
|
||
|
|
||
|
%build
|
||
|
%python_build
|
||
|
|
||
|
%install
|
||
|
%python_install
|
||
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||
|
|
||
|
%python_clone -a %{buildroot}%{_bindir}/radon
|
||
|
|
||
|
%check
|
||
|
%python_exec radon/tests/run.py
|
||
|
|
||
|
%post
|
||
|
%python_install_alternative radon
|
||
|
|
||
|
%postun
|
||
|
%python_uninstall_alternative radon
|
||
|
|
||
|
%files %{python_files}
|
||
|
%doc CHANGELOG README.rst
|
||
|
%license LICENSE
|
||
|
%python_alternative %{_bindir}/radon
|
||
|
%{python_sitelib}/*
|
||
|
|
||
|
%changelog
|