14
0
forked from pool/python-radon

Accepting request 612002 from devel:languages:python:misc

Code Metrics in Python

OBS-URL: https://build.opensuse.org/request/show/612002
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-radon?expand=0&rev=1
This commit is contained in:
Todd R
2018-05-24 20:56:47 +00:00
committed by Git OBS Bridge
commit 3684a5ebc2
5 changed files with 121 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

11
python-radon.changes Normal file
View File

@@ -0,0 +1,11 @@
-------------------------------------------------------------------
Thu May 24 17:41:18 UTC 2018 - toddrme2178@gmail.com
- Update to 2.2.0
* Add an option to show closures when Radon is used from flake8: #135
- spec file cleanups
-------------------------------------------------------------------
Fri Oct 20 16:18:07 UTC 2017 - toddrme2178@gmail.com
- initial version

83
python-radon.spec Normal file
View File

@@ -0,0 +1,83 @@
#
# 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

3
radon-2.2.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d5b7fd86c8ce3f81a2307298aa5e00a0b9d3334c9aeb69a9edce654b302cf81d
size 3494861