diff options
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | cmd2.spec | 100 | ||||
| -rw-r--r-- | python-cmd2.spec | 89 | ||||
| -rw-r--r-- | sources | 2 |
4 files changed, 102 insertions, 90 deletions
@@ -1 +1,2 @@ /cmd2-2.6.2.tar.gz +/python-cmd2-4.3.1.tar.gz diff --git a/cmd2.spec b/cmd2.spec new file mode 100644 index 0000000..44bd7a9 --- /dev/null +++ b/cmd2.spec @@ -0,0 +1,100 @@ +# Build scheme: pyproject (setuptools backend, openEuler 24.03 LTS SP4) +# pyproject.toml build-backend = "setuptools.build_meta" +# Pure Python noarch package; runtime deps mirrored to BuildRequires for import test. +# +# Adaptations for openEuler 24.03 LTS SP4 build environment (setuptools 68.0.0 < 77): +# 1. setuptools-scm not in repos (register-dep blocks toolchain registration): +# patch pyproject.toml to pin static version, remove setuptools-scm from +# [build-system].requires, drop [tool.setuptools_scm] section. +# 2. PEP 639 SPDX license string ("license = "MIT"") needs setuptools >= 77: +# convert to PEP 621 table form {text = "MIT"} and remove license-files field. +%global pypi_name cmd2 + +Name: python-%{pypi_name} +Version: 4.3.1 +Release: 1%{?dist} +Summary: Tool for building powerful command-line applications in Python +License: MIT +URL: https://github.com/python-cmd2/cmd2 +Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz +BuildArch: noarch + +%description +cmd2 is a tool for building powerful command-line applications in Python. It +extends the Python Standard Library's cmd module to provide a rich set of +features including tab completion, command history, scripting, aliases, and +more, making it easy to build feature-rich and user-friendly CLI apps. + + +%package -n python3-%{pypi_name} +Summary: Tool for building powerful command-line applications in Python +Provides: python-%{pypi_name} +Provides: python3dist(%{pypi_name}) = %{version} +BuildRequires: python3-devel +BuildRequires: python3-pip +BuildRequires: pyproject-rpm-macros +BuildRequires: python3-setuptools +# Runtime deps mirrored as BuildRequires to support %check import test +BuildRequires: python3-prompt-toolkit >= 3.0.53 +BuildRequires: python3-pyperclip >= 1.8.2 +BuildRequires: python3-rich >= 15.0.0 +BuildRequires: python3-rich-argparse >= 1.7.2 +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 command-line applications in Python. It +extends the Python Standard Library's cmd module to provide a rich set of +features including tab completion, command history, scripting, aliases, and +more, making it easy to build feature-rich and user-friendly CLI apps. + + +%package help +Summary: Development documents and examples for %{pypi_name} +Provides: python3-%{pypi_name}-doc +Requires: python3-%{pypi_name} +%description help +cmd2 is a tool for building powerful command-line applications in Python. +This package provides documentation and examples for %{pypi_name}. + + +%prep +%autosetup -n %{name}-%{version} +# Adapt pyproject.toml for openEuler 24.03 LTS SP4 (setuptools 68.0.0 < 77): +# 1. setuptools-scm not in repos -> pin static version, drop setuptools-scm +sed -i 's/^dynamic = \["version"\]/version = "%{version}"/' pyproject.toml +sed -i 's/, "setuptools-scm>=9.2.1"//' pyproject.toml +sed -i '/^\[tool.setuptools_scm\]$/d' pyproject.toml +# 2. PEP 639 SPDX license string needs setuptools >= 77 -> PEP 621 table form +sed -i 's/^license = "MIT"/license = {text = "MIT"}/' pyproject.toml +sed -i '/^license-files/d' pyproject.toml + + +%build +%pyproject_build + + +%install +%pyproject_install + + +%check +# Use bare python3 command; the python3 rpm macro is undefined on openEuler 24.03 LTS SP4. +python3 -c "import cmd2; print(cmd2.__file__)" + + +%files -n python3-%{pypi_name} +%license LICENSE +%{python3_sitelib}/cmd2/ +%{python3_sitelib}/cmd2-%{version}*.dist-info/ + +%files help +%doc README.md +%doc CHANGELOG.md + + +%changelog +* Wed Oct 28 2026 Python_Bot <Python_Bot@openeuler.org> - 4.3.1-1 +- Initial package diff --git a/python-cmd2.spec b/python-cmd2.spec deleted file mode 100644 index 01dbc1c..0000000 --- a/python-cmd2.spec +++ /dev/null @@ -1,89 +0,0 @@ -%global _empty_manifest_terminate_build 0 -Name: python-cmd2 -Version: 2.6.2 -Release: 1 -Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python -License: MIT -URL: https://github.com/python-cmd2/cmd2 -Source0: https://files.pythonhosted.org/packages/9d/29/e0dd8ca27c5ee55feea1a423ac0b55c7bc68b551d393085ae7c6da12a2e9/cmd2-2.6.2.tar.gz -BuildArch: noarch - -%description -quickly build feature-rich and user-friendly interactive command line applications in Python - -%package -n python3-cmd2 -Summary: cmd2 - quickly build feature-rich and user-friendly interactive command line applications in Python -Provides: python-cmd2 = %{version}-%{release} -# Base build requires -BuildRequires: python3-devel -BuildRequires: python3-setuptools_scm -BuildRequires: python3-pip -BuildRequires: python3-hatchling python3-hatch-vcs python3-wheel python3-flit -# General requires -Requires: python3-attrs -Requires: python3-pyperclip -Requires: python3-wcwidth -Requires: python3-importlib-metadata -Requires: python3-typing-extensions -%description -n python3-cmd2 -quickly build feature-rich and user-friendly interactive command line applications in Python - -%package help -Summary: Development documents and examples for cmd2 -Provides: python3-cmd2-doc -%description help -quickly build feature-rich and user-friendly interactive command line applications in Python - -%prep -%autosetup -p1 -n cmd2-%{version} - -%build -%pyproject_build - -%install -%pyproject_install -install -d -m755 %{buildroot}/%{_pkgdocdir} -if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi -if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi -if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi - -%files -n python3-cmd2 -%{python3_sitelib}/* - -%files help -%{_docdir}/* - -%changelog -* Wed Jul 22 2026 shaoning <shaoning@kylinos.cn> - 2.6.2-1 -- Update package to version 2.6.2 - -* Fri May 15 2026 wuzhaomin <wuzhaomin@kylinos.cn> - 2.6.1-1 -- Fixed bug that prevented `cmd2` from working with `from __future__ import annotations` -- Fixed duplicated parameter tables in API documentation. -- Fixed docstring style for MkDocs API documentation so parameters are displayed properly. -- Fixed 'index out of range' error when passing no arguments to an argparse-based command function. -- Fixed issue where argument parsers for overridden commands were not being created. - -* Tue Jun 11 2024 zeng liwen <zengliwen@kylinos.cn> - 2.4.3-2 -- Backport patch:Fix Nonetype error when building with PyInstaller and no-console flag - -* Tue Mar 07 2023 wangjunqi <wangjunqi@kylinos.cn> - 2.4.3-1 -- Update package to version 2.4.3 - -* Wed Aug 10 2022 liqiuyu <liqiuyu@kylinos.cn> - 2.4.2-1 -- update to 2.4.2 - -* Tue Jul 26 2022 renliang16 <renliang@uniontech.com> - 2.4.0-1 -- Upgrade package python3-cmd2 to version 2.4.0 - -* Mon Jul 26 2021 liusheng <liusheng2048@gmail.com> - 1.5.0-1 -- Upgrade to version 1.5.0 - -* Mon Aug 2 2021 huangtianhua <huangtianhua@huawei.com> - 1.4.0-3 -- Add python3-setuptools_scm as buildrequire - -* Fri Jan 29 2021 zhangy <zhangy1317@foxmail.com> -- Add buildrequires - -* Wed Dec 09 2020 Python_Bot <Python_Bot@openeuler.org> -- Package Spec generated @@ -1 +1 @@ -e099c6529e529f7f589f4bf7a4f341f4 cmd2-2.6.2.tar.gz +621cdf967dcab5afd62a31a89cd3e644 python-cmd2-4.3.1.tar.gz |
