python-cmd2/python-cmd2.spec
Todd R ba66dcb5fa Accepting request 638706 from openSUSE:Factory
Resubmit update to version 0.9.4

I had to revert to the previous version in openSUSE:Factory, as py2 support was dropped. Due to a timing issue,
this package has since been promoted to be a ring package - and there are various things buildrequiring the py2-cmd2 variant too.

Please accept this update again - upon resubmit to oS:F, this will now go through a letter staging

- Update to version 0.9.4
  +  Bug Fixes
    * Fixed bug where ``preparse`` was not getting called
    * Fixed bug in parsing of multiline commands where matching quote is on another line 
  +  Enhancements
    * Improved implementation of lifecycle hooks to support a plugin
      framework, see ``docs/hooks.rst`` for details.
    * New dependency on ``attrs`` third party module
    * Added ``matches_sorted`` member to support custom sorting of tab-completion matches
    * Added [tab_autocomp_dynamic.py](https://github.com/python-cmd2/cmd2/blob/master/examples/tab_autocomp_dynamic.py) example
        * Demonstrates updating the argparse object during init instead of during class construction
  +  Deprecations
    * Deprecated the following hook methods, see ``hooks.rst`` for full details:
       * ``cmd2.Cmd.preparse()`` - equivalent functionality available
         via ``cmd2.Cmd.register_postparsing_hook()``
       * ``cmd2.Cmd.postparsing_precmd()`` - equivalent functionality available
         via ``cmd2.Cmd.register_postparsing_hook()``
       * ``cmd2.Cmd.postparsing_postcmd()`` - equivalent functionality available
         via ``cmd2.Cmd.register_postcmd_hook()``
- Update to version 0.9.3
  +  Bug Fixes
    * Fixed bug when StatementParser ``__init__()`` was called with ``terminators`` equal to ``None``
    * Fixed bug when ``Cmd.onecmd()`` was called with a raw ``str``
  +  Enhancements
    * Added ``--clear`` flag to ``history`` command that clears both the command and readline history.
  +  Deletions
    * The ``CmdResult`` helper class which was *deprecated* in the previous release has now been deleted
        * It has been replaced by the improved ``CommandResult`` class
- Update to version 0.9.2
  +  Bug Fixes

OBS-URL: https://build.opensuse.org/request/show/638706
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cmd2?expand=0&rev=33
2018-09-27 14:34:49 +00:00

92 lines
2.9 KiB
RPMSpec

#
# spec file for package python-cmd2
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
%define skip_python2 1
Name: python-cmd2
Version: 0.9.4
Release: 0
Summary: Extra features for standard library's cmd module
License: MIT
Group: Development/Languages/Python
Url: https://github.com/python-cmd2/cmd2
Source: https://files.pythonhosted.org/packages/source/c/cmd2/cmd2-%{version}.tar.gz
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
# SECTION Test requirements
BuildRequires: %{python_module attrs}
BuildRequires: %{python_module colorama}
BuildRequires: %{python_module mock}
BuildRequires: %{python_module pyperclip >= 1.5.27}
BuildRequires: %{python_module pytest-mock}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module wcwidth}
# /SECTION
Requires: python-attrs
Requires: python-colorama
Requires: python-pyperclip >= 1.5.27
Requires: python-wcwidth
BuildArch: noarch
%python_subpackages
%description
Enhancements for standard library's cmd module.
Drop-in replacement adds several features for command-prompt tools:
* Searchable command history (commands: "hi", "li", "run")
* Load commands from file, save to file, edit commands in file
* Multi-line commands
* Case-insensitive commands
* Special-character shortcut commands (beyond cmd's "@" and "!")
* Settable environment parameters
* Parsing commands with flags
* > (filename), >> (filename) redirect output to file
* < (filename) gets input from file
* bare >, >>, < redirect to/from paste buffer
* accepts abbreviated commands when unambiguous
* `py` enters interactive Python console
* test apps against sample session transcript (see example/example.py)
%prep
%setup -q -n cmd2-%{version}
# Fix non-executable-script
sed -i -e '/^#!\//, 1d' cmd2/cmd2.py
# Fix spurious-executable-perm
chmod a-x README.md
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%check
%python_exec setup.py test
%files %{python_files}
%license LICENSE
%doc CHANGELOG.md CODEOWNERS README.md
%{python_sitelib}/*
%changelog