From e00cc73d83578c2a7a7bb9007b4cf11137d5ae1c33d8f3bc0b432e7550fcc258 Mon Sep 17 00:00:00 2001 From: Nico Krapp Date: Fri, 16 May 2025 13:26:34 +0000 Subject: [PATCH] - Convert to pip-based build OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cmdln?expand=0&rev=20 --- .gitattributes | 23 ++++++++++++++ .gitignore | 1 + cmdln-2.0.0.zip | 3 ++ python-cmdln.changes | 73 ++++++++++++++++++++++++++++++++++++++++++++ python-cmdln.spec | 67 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 167 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 cmdln-2.0.0.zip create mode 100644 python-cmdln.changes create mode 100644 python-cmdln.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/cmdln-2.0.0.zip b/cmdln-2.0.0.zip new file mode 100644 index 0000000..225aba0 --- /dev/null +++ b/cmdln-2.0.0.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9b036d89914b49f5f3166a8b3730729f17a7fb533f6a264947a8bbef016d7e20 +size 61125 diff --git a/python-cmdln.changes b/python-cmdln.changes new file mode 100644 index 0000000..c78854c --- /dev/null +++ b/python-cmdln.changes @@ -0,0 +1,73 @@ +------------------------------------------------------------------- +Fri May 16 09:36:40 UTC 2025 - Markéta Machová + +- Convert to pip-based build + +------------------------------------------------------------------- +Fri Oct 23 14:44:10 UTC 2020 - Matej Cepl + +- Use %pycache_only %python_sitelib instead of %python3_sitelib + fixes gh#openSUSE/python-rpm-macros#64#issuecomment-715373348 + +------------------------------------------------------------------- +Thu Sep 7 09:49:23 UTC 2017 - mimi.vx@gmail.com + +- convert to singlespec package + +------------------------------------------------------------------- +Sat May 2 15:15:13 UTC 2015 - benoit.monin@gmx.fr + +- update to version 2.0.0: + * Added support for Python 3 (test suite fully passing) +- additional changes from version 1.3.1: + * Allow dynamic setting of `self.prompt` and have it update +- additional changes from version 1.3.0: + * Change `self.postoptparse()` hook handling to use the retval + value. If it is none-zero (or non-None), then `Cmdln.main()` + processing exits + * Fix tab-completion on Mac with Python builds that build against + editline where `readline.parse_and_bind` have different syntax +- additional changes from version 1.2.0: + * Issue 3: Raise upper bound width for left column in "Commands" + and "help topics" lists in help output to 30. Also fix buglet + in that column formatting. + * Issue 7: add `man_sections_from_cmdln(...)` for generating + decent man page content automatically from a `Cmdln` subclass + instance. See ManPageGeneration for an overview. +- additional changes from version 1.1.3: + * Stop using `string.whitespace` because it can be an 8-bit + string with non-ASCII chars in it, leading to potential + `UnicodeDecodeError`s. See Komodo Bug 81316. +- update project URL +- add tcl as BuildRequires for the tests +- remove unwanted shebang from cmdln.py +- remove executable bit of examples in documentation +- run the tests during package build +- remove README.txt from package, not provided anymore + +------------------------------------------------------------------- +Thu Oct 24 13:45:41 UTC 2013 - speilicke@suse.com + +- Update to version 1.1.2: + + No changelog +- Spec file cleanup + +------------------------------------------------------------------- +Fri Aug 28 22:31:23 CEST 2009 - coolo@novell.com + +- merge build service with factory + +------------------------------------------------------------------- +Mon Jun 9 02:14:10 CEST 2008 - poeml@suse.de + +- don't make the "Release" tag a macro + +------------------------------------------------------------------- +Thu May 1 12:33:29 CEST 2008 - poeml@suse.de + +- This package is not a noarch package -- fix the build. + +------------------------------------------------------------------- +Thu Mar 6 09:11:00 CET 2008 - toms@suse.de + +- Initial package 1.1.1 diff --git a/python-cmdln.spec b/python-cmdln.spec new file mode 100644 index 0000000..b29bede --- /dev/null +++ b/python-cmdln.spec @@ -0,0 +1,67 @@ +# +# spec file for package python-cmdln +# +# Copyright (c) 2025 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +Name: python-cmdln +Version: 2.0.0 +Release: 0 +Summary: An improved cmd.py for Writing Multi-command Scripts and Shells +License: MIT +Group: Development/Libraries/Python +URL: https://github.com/trentm/cmdln +Source: https://files.pythonhosted.org/packages/source/c/cmdln/cmdln-%{version}.zip +BuildRequires: %{python_module base} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: python-rpm-macros +BuildRequires: tcl +BuildRequires: unzip +BuildArch: noarch +%python_subpackages + +%description +`cmdln.py` is an extension of Python's default `cmd.py` module that +provides "a simple framework for writing line-oriented command +interpreters". The idea (with both cmd.py and cmdln.py) is to be able +to quickly build multi-sub-command tools (think cvs or svn) and/or +simple interactive shells (think gdb or pdb). Cmdln's extensions make +it more natural to write sub-commands, integrate optparse for simple +option processing, and make having good command documentation easier. + +%prep +%setup -q -n cmdln-%{version} +# remove unwanted shebang +sed -i '/^#!/d' lib/cmdln.py +# remove executable bit in documentation +chmod -x examples/* + +%build +%pyproject_wheel + +%install +%pyproject_install + +%check + +%files %{python_files} +%license LICENSE.txt +%doc docs/ examples/ +%{python_sitelib}/cmdln* +%pycache_only %{python_sitelib}/__pycache__/* + +%changelog