forked from pool/python-radon
- Update to 6.0.1:
* Prevent tomllib error when the `toml` module is not available * Add support for `match` pattern in Python 3.10+, by @DolajoCZ: #227 * Fix typo in Markdown export, reported by @huornlmj: #231 * Remove unnecessary "future" dependency, by @mgorny: #234 * Add `pyproject.toml` support, by @ajslater: #236 * Allow Mando v0.7.1, by @ajslater: #237 * Fix HCHarvester JSON results format, by @benabel: #240 - Use pyproject macros due to the switch to poetry. - Add patch add-scripts-to-pyproject.toml.patch, make sure the CLI tool is built. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-radon?expand=0&rev=28
This commit is contained in:
25
add-scripts-to-pyproject.toml.patch
Normal file
25
add-scripts-to-pyproject.toml.patch
Normal file
@@ -0,0 +1,25 @@
|
||||
From d88d9f5651aab064b5535e3b33d923771dcceeea Mon Sep 17 00:00:00 2001
|
||||
From: Steve Kowalik <steven@wedontsleep.org>
|
||||
Date: Fri, 1 Sep 2023 14:37:06 +1000
|
||||
Subject: [PATCH] Add radon CLI script to pyproject.toml
|
||||
|
||||
The pyproject.toml is missing the tool.poetry.scripts section, which
|
||||
means that builds that rely only on pyproject.toml will not install it.
|
||||
---
|
||||
pyproject.toml | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/pyproject.toml b/pyproject.toml
|
||||
index 0e869cf..c25f1bd 100644
|
||||
--- a/pyproject.toml
|
||||
+++ b/pyproject.toml
|
||||
@@ -26,6 +26,9 @@ argparse = "*"
|
||||
nbformat = "*"
|
||||
tox = "^4.4.7"
|
||||
|
||||
+[tool.poetry.scripts]
|
||||
+radon = "radon:main"
|
||||
+
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
@@ -1,3 +1,18 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Sep 1 04:45:39 UTC 2023 - Steve Kowalik <steven.kowalik@suse.com>
|
||||
|
||||
- Update to 6.0.1:
|
||||
* Prevent tomllib error when the `toml` module is not available
|
||||
* Add support for `match` pattern in Python 3.10+, by @DolajoCZ: #227
|
||||
* Fix typo in Markdown export, reported by @huornlmj: #231
|
||||
* Remove unnecessary "future" dependency, by @mgorny: #234
|
||||
* Add `pyproject.toml` support, by @ajslater: #236
|
||||
* Allow Mando v0.7.1, by @ajslater: #237
|
||||
* Fix HCHarvester JSON results format, by @benabel: #240
|
||||
- Use pyproject macros due to the switch to poetry.
|
||||
- Add patch add-scripts-to-pyproject.toml.patch, make sure the CLI tool
|
||||
is built.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 13 09:07:23 UTC 2023 - ecsos <ecsos@opensuse.org>
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package python-radon
|
||||
#
|
||||
# Copyright (c) 2022 SUSE LLC
|
||||
# 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
|
||||
@@ -18,25 +18,26 @@
|
||||
|
||||
%{?sle15_python_module_pythons}
|
||||
Name: python-radon
|
||||
Version: 5.1.0
|
||||
Version: 6.0.1
|
||||
Release: 0
|
||||
Summary: Code Metrics in Python
|
||||
License: MIT
|
||||
Group: Development/Languages/Python
|
||||
URL: https://github.com/rubik/radon
|
||||
Source: https://files.pythonhosted.org/packages/source/r/radon/radon-%{version}.tar.gz
|
||||
BuildRequires: %{python_module setuptools}
|
||||
# PATCH-FIX-UPSTREAM gh#rubik/radon#250
|
||||
Patch0: add-scripts-to-pyproject.toml.patch
|
||||
BuildRequires: %{python_module pip}
|
||||
BuildRequires: %{python_module poetry}
|
||||
BuildRequires: %{python_module wheel}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
Requires: python-colorama >= 0.4.1
|
||||
Requires: python-future
|
||||
Requires: python-mando >= 0.6
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
BuildArch: noarch
|
||||
# SECTION test requirements
|
||||
BuildRequires: %{python_module colorama >= 0.4.1}
|
||||
BuildRequires: %{python_module future}
|
||||
BuildRequires: %{python_module mando >= 0.6}
|
||||
BuildRequires: %{python_module pytest >= 2.7}
|
||||
BuildRequires: %{python_module pytest-mock}
|
||||
@@ -53,17 +54,16 @@ Radon can compute:
|
||||
* Maintainability Index (the one used in Visual Studio)
|
||||
|
||||
%prep
|
||||
%setup -q -n radon-%{version}
|
||||
%autosetup -p1 -n radon-%{version}
|
||||
# unpin mando
|
||||
sed -i -E 's/(mando.*),<0\.7/\1/' setup.py
|
||||
|
||||
%build
|
||||
%python_build
|
||||
%pyproject_wheel
|
||||
|
||||
%install
|
||||
%python_install
|
||||
%pyproject_install
|
||||
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
||||
|
||||
%python_clone -a %{buildroot}%{_bindir}/radon
|
||||
|
||||
%check
|
||||
@@ -80,6 +80,6 @@ sed -i -E 's/(mando.*),<0\.7/\1/' setup.py
|
||||
%license LICENSE
|
||||
%python_alternative %{_bindir}/radon
|
||||
%{python_sitelib}/radon
|
||||
%{python_sitelib}/radon-%{version}*-info
|
||||
%{python_sitelib}/radon-%{version}.dist-info
|
||||
|
||||
%changelog
|
||||
|
@@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:cb1d8752e5f862fb9e20d82b5f758cbc4fb1237c92c9a66450ea0ea7bf29aeee
|
||||
size 1873643
|
3
radon-6.0.1.tar.gz
Normal file
3
radon-6.0.1.tar.gz
Normal file
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:d1ac0053943a893878940fedc8b19ace70386fc9c9bf0a09229a44125ebf45b5
|
||||
size 1874992
|
Reference in New Issue
Block a user