1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# topdir: python-cmd2-4.3.1 (set via tar --transform to Name-Version)
# 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.
%global pypi_name cmd2
Name: python-%{pypi_name}
Version: 4.3.1
Release: 1%{?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
BuildArch: noarch
%description
cmd2 is a tool for building powerful, feature-rich, and user-friendly interactive
command line applications in Python. It extends the standard library's cmd.Cmd
with argument parsing, generated help, tab completion, command history, scripting,
output styling, and more.
%package -n python3-%{pypi_name}
Summary: Tool for building powerful, feature-rich, and user-friendly interactive command line applications
Provides: python-%{pypi_name}
Provides: python3dist(%{pypi_name}) = %{version}
BuildRequires: python3-devel
BuildRequires: python3-pip
BuildRequires: python3-setuptools
Requires: python3-prompt-toolkit >= 3.0.53
Requires: python3-pyperclip >= 1.8.2
Requires: python3-rich >= 15.0.0
Requires: python3-rich-argparse >= 1.7.2
%description -n python3-%{pypi_name}
cmd2 is a tool for building powerful, feature-rich, and user-friendly interactive
command line applications in Python. It extends the standard library's cmd.Cmd
with argument parsing, generated help, tab completion, command history, scripting,
output styling, and more.
%package help
Summary: Development documents and examples for %{pypi_name}
Requires: python3-%{pypi_name}
Provides: python3-%{pypi_name}-doc
%description help
cmd2 is a tool for building powerful, feature-rich, and user-friendly interactive
command line applications in Python.
This package provides development documents and examples for cmd2.
%prep
%autosetup -n %{name}-%{version} -p1
%build
pip3 wheel --no-build-isolation --no-deps --wheel-dir %{_builddir}/wheels .
%install
pip3 install --no-build-isolation --no-index \
--find-links %{_builddir}/wheels \
--root %{buildroot} --prefix /usr \
%{pypi_name}==%{version}
%check
%{python3} -c "import cmd2"
%files -n python3-%{pypi_name}
%license LICENSE
%{python3_sitelib}/cmd2/
%{python3_sitelib}/cmd2-%{version}*.dist-info/
%files help
%doc README.md CHANGELOG.md
%license LICENSE
%changelog
* Wed Oct 28 2026 Python_Bot <Python_Bot@openeuler.org> - 4.3.1-1
- Initial package
|