forked from pool/python-prompt_toolkit
- Support format specifiers for HTML and ANSI formatted text. - Accept defaults for checkbox and radio list, and their corresponding dialogs. - Fix resetting of cursor shape after the application terminates. - Support for cursor shapes. The cursor shape for prompts/applications can now be configured, either as a fixed cursor shape, or in case of Vi input mode, according to the current input mode. - Handle "cursor forward" command in ANSI formatted text. This makes it possible to render many kinds of generated ANSI art. - Accept `align` attribute in `Label` widget. - Added `PlainTextOutput`: an output implementation that doesn't render any ANSI escape sequences. This will be used by default when redirecting stdout to a file. - Added `create_app_session_from_tty`: a context manager that enforces input/output to go to the current TTY, even if stdin/stdout are attached to pipes. - Added `to_plain_text` utility for converting formatted text into plain text. - Don't automatically use `sys.stderr` for output when `sys.stdout` is not a TTY, but `sys.stderr` is. The previous behavior was confusing, especially when rendering formatted text to the output, and we expect it to follow OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-prompt_toolkit?expand=0&rev=34
62 lines
1.8 KiB
RPMSpec
62 lines
1.8 KiB
RPMSpec
#
|
|
# spec file for package python-prompt_toolkit
|
|
#
|
|
# Copyright (c) 2022 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/
|
|
#
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
%define skip_python2 1
|
|
Name: python-prompt_toolkit
|
|
Version: 3.0.28
|
|
Release: 0
|
|
Summary: Library for building interactive command lines in Python
|
|
License: BSD-3-Clause
|
|
URL: https://github.com/jonathanslenders/python-prompt-toolkit
|
|
Source: https://files.pythonhosted.org/packages/source/p/prompt_toolkit/prompt_toolkit-%{version}.tar.gz
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: %{python_module wcwidth}
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
Requires: python-wcwidth
|
|
Recommends: python-Pygments
|
|
Conflicts: python-prompt_toolkit1
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
Prompt toolkit is a library for building interactive command
|
|
lines in Python.
|
|
|
|
%prep
|
|
%setup -q -n prompt_toolkit-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%doc AUTHORS.rst README.rst CHANGELOG
|
|
%{python_sitelib}/prompt_toolkit*
|
|
|
|
%changelog
|