summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2.spec10
-rw-r--r--fix-pyproject-license.patch20
2 files changed, 29 insertions, 1 deletions
diff --git a/cmd2.spec b/cmd2.spec
index d0aca14..b502d97 100644
--- a/cmd2.spec
+++ b/cmd2.spec
@@ -2,16 +2,19 @@
# Build path: 方案 pip (setuptools.build_meta backend, no setup.py present)
# Patch0 removes setuptools-scm (build-system tool not in openEuler repos) and
# pins static version=4.3.1 to avoid git-tag-based version inference in build env.
+# Patch1 converts PEP 639 SPDX license string (`license = "MIT"`) to PEP 621
+# table form (`license = {text = "MIT"}`) for setuptools 68.0.0 compatibility.
%global pypi_name cmd2
Name: python-%{pypi_name}
Version: 4.3.1
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Tool for building powerful, feature-rich, and user-friendly interactive command line applications
License: MIT
URL: https://github.com/python-cmd2/cmd2
Source0: %{url}/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz
Patch0: no-setuptools-scm.patch
+Patch1: fix-pyproject-license.patch
BuildArch: noarch
%description
@@ -28,6 +31,7 @@ Provides: python3dist(%{pypi_name}) = %{version}
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
+BuildRequires: python3-wheel
Requires: python3-prompt-toolkit >= 3.0.53
Requires: python3-pyperclip >= 1.8.2
Requires: python3-rich >= 15.0.0
@@ -83,5 +87,9 @@ pip3 install --no-build-isolation --no-index \
%changelog
+* Wed Oct 28 2026 Python_Bot <Python_Bot@openeuler.org> - 4.3.1-2
+- Add Patch1 to convert PEP 639 license string to PEP 621 table form
+ for setuptools 68.0.0 compatibility
+
* Wed Oct 28 2026 Python_Bot <Python_Bot@openeuler.org> - 4.3.1-1
- Initial package
diff --git a/fix-pyproject-license.patch b/fix-pyproject-license.patch
new file mode 100644
index 0000000..2c267e4
--- /dev/null
+++ b/fix-pyproject-license.patch
@@ -0,0 +1,20 @@
+Description: Convert PEP 639 SPDX license string form to PEP 621 table form
+ cmd2 4.3.1 pyproject.toml uses `license = "MIT"` (PEP 639 SPDX string) and
+ `license-files = ["LICENSE"]`, which require setuptools >= 77.0.0.
+ The openEuler 24.03 LTS SP4 chroot ships setuptools 68.0.0, which only
+ supports the older PEP 621 table form `license = {text = "..."}`.
+ This patch converts the license declaration so metadata generation
+ succeeds under the available setuptools, without upgrading the toolchain.
+
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -10,8 +10,7 @@
+ readme = "README.md"
+ requires-python = ">=3.11"
+ keywords = ["CLI", "cmd", "command", "interactive", "prompt", "Python"]
+-license = "MIT"
+-license-files = ["LICENSE"]
++license = {text = "MIT"}
+ classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Environment :: Console",