diff options
| author | CoprDistGit <infra@openeuler.org> | 2026-10-28 03:48:07 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2026-10-28 03:48:07 +0000 |
| commit | 589108342e576b10f4da6b99961184718843a73f (patch) | |
| tree | fb059a9bc1445229cd4d44c23fb6b7db4a1f9631 | |
| parent | 7f22859873d8d05a2067f629c0c433f157a77e39 (diff) | |
automatic import of python-cmd2
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | cmd2.spec | 87 | ||||
| -rw-r--r-- | no-setuptools-scm.patch | 25 | ||||
| -rw-r--r-- | sources | 1 |
4 files changed, 114 insertions, 0 deletions
@@ -0,0 +1 @@ +/python-cmd2-4.3.1.tar.gz diff --git a/cmd2.spec b/cmd2.spec new file mode 100644 index 0000000..d0aca14 --- /dev/null +++ b/cmd2.spec @@ -0,0 +1,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 diff --git a/no-setuptools-scm.patch b/no-setuptools-scm.patch new file mode 100644 index 0000000..fe5ff85 --- /dev/null +++ b/no-setuptools-scm.patch @@ -0,0 +1,25 @@ +diff --git a/pyproject.toml b/pyproject.toml +index 5b500b2a..9d9c72b7 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,10 +1,10 @@ + [build-system] +-requires = ["build>=1.3.0", "setuptools>=80.8.0", "setuptools-scm>=9.2.1"] ++requires = ["setuptools>=61.0"] + build-backend = "setuptools.build_meta" + + [project] + name = "cmd2" +-dynamic = ["version"] ++version = "4.3.1" + description = "cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python" + authors = [{ name = "cmd2 Contributors" }] + readme = "README.md" +@@ -133,7 +133,6 @@ exclude_also = ["if __name__ == .__main__.:"] + [tool.setuptools] + packages = ["cmd2"] + +-[tool.setuptools_scm] + + [tool.uv] + default-groups = ["build", "dev"] @@ -0,0 +1 @@ +af9cf8e9f95660c2f3ea43f7a24a9f1f python-cmd2-4.3.1.tar.gz |
