diff --git a/backport-Fix-Nonetype-error-when-building-with-PyInstaller-and-no-console-flag-2.4.3.patch b/backport-Fix-Nonetype-error-when-building-with-PyInstaller-and-no-console-flag-2.4.3.patch deleted file mode 100644 index b3abc27b773d41c5e82c60756615a3e5c68329ad..0000000000000000000000000000000000000000 --- a/backport-Fix-Nonetype-error-when-building-with-PyInstaller-and-no-console-flag-2.4.3.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 3fc9b259d19f825b29fa72f0522bee1666a916a8 Mon Sep 17 00:00:00 2001 -From: zengliwen -Date: Tue, 11 Jun 2024 14:52:45 +0800 -Subject: [PATCH] [BugFix] Fix Nonetype error when building with PyInstaller - and no-console flag - ---- - cmd2/rl_utils.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/cmd2/rl_utils.py b/cmd2/rl_utils.py -index e9557f0..0d19635 100644 ---- a/cmd2/rl_utils.py -+++ b/cmd2/rl_utils.py -@@ -70,7 +70,7 @@ if 'pyreadline3' in sys.modules: - ) - - # Check if we are running in a terminal -- if sys.stdout.isatty(): # pragma: no cover -+ if sys.stdout is not None and sys.stdout.isatty(): # pragma: no cover - # noinspection PyPep8Naming,PyUnresolvedReferences - def enable_win_vt100(handle: HANDLE) -> bool: - """ --- -2.23.0 - diff --git a/cmd2-2.4.3.tar.gz b/cmd2-2.4.3.tar.gz deleted file mode 100644 index 4147fc675607149527232187567ef73e468d1115..0000000000000000000000000000000000000000 Binary files a/cmd2-2.4.3.tar.gz and /dev/null differ diff --git a/cmd2-2.7.0.tar.gz b/cmd2-2.7.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..13ca7b9ef59bfa1ed2df6095e12b50d5a6ba4266 Binary files /dev/null and b/cmd2-2.7.0.tar.gz differ diff --git a/python-cmd2.spec b/python-cmd2.spec index 61d934db884d6aabc6d948e653622e8912d93185..a7d5f02715e36b9c295183527fc9bfd61b0e6758 100644 --- a/python-cmd2.spec +++ b/python-cmd2.spec @@ -1,12 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-cmd2 -Version: 2.4.3 -Release: 2 +Version: 2.7.0 +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/13/04/b85213575a7bf31cbf1d699cc7d5500d8ca8e52cbd1f3569a753a5376d5c/cmd2-2.4.3.tar.gz -Patch0: backport-Fix-Nonetype-error-when-building-with-PyInstaller-and-no-console-flag-2.4.3.patch +Source0: https://files.pythonhosted.org/packages/75/68/4bf43d284e41c01c6011146e5c2824aa6f17a3bb1ef10ba3dbbae5cf31dc/cmd2-2.7.0.tar.gz BuildArch: noarch %description @@ -39,46 +38,29 @@ quickly build feature-rich and user-friendly interactive command line applicatio %autosetup -p1 -n cmd2-%{version} %build -%py3_build +%pyproject_build %install -%py3_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 -if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi -if [ -f README.rst ]; then cp -af README.rst %{buildroot}/%{_pkgdocdir}; fi -if [ -f README.md ]; then cp -af README.md %{buildroot}/%{_pkgdocdir}; fi -if [ -f README.txt ]; then cp -af README.txt %{buildroot}/%{_pkgdocdir}; fi -pushd %{buildroot} -if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/bin ]; then - find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst -fi -if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst -fi -touch doclist.lst -if [ -d usr/share/man ]; then - find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst -fi -popd -mv %{buildroot}/filelist.lst . -mv %{buildroot}/doclist.lst . - -%files -n python3-cmd2 -f filelist.lst -%dir %{python3_sitelib}/* - -%files help -f doclist.lst + +%files -n python3-cmd2 +%{python3_sitelib}/* + +%files help %{_docdir}/* %changelog +* Tue Aug 05 2025 zengliwen - 2.7.0-1 +- Update to 2.7.0-1 +- Integrated rich-argparse with cmd2's default argparse help formatter +- Added explicit support for free-threaded versions of Python, starting with version 3.14 +- Restored code to set a parser's prog value in the with_argparser decorator. This is to preserve backward compatibility in the cmd2 2.0 family. This functionality will be removed in cmd2 3.0.0. +- Fixed bug that prevented cmd2 from working with from __future__ import annotations + * Tue Jun 11 2024 zeng liwen - 2.4.3-2 - Backport patch:Fix Nonetype error when building with PyInstaller and no-console flag