Compare commits
10 Commits
c9899cfab5
...
323208de56
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
323208de56 | ||
|
|
9c71304d67 | ||
|
|
bfbad15695 | ||
|
|
2dcce1feb7 | ||
|
|
0263da9ac5 | ||
|
|
9f6d680920 | ||
|
|
524c70d42d | ||
|
|
212ed6be0c | ||
|
|
d12735a750 | ||
|
|
12ef1e1dd9 |
@ -0,0 +1,25 @@
|
|||||||
|
From 949c674b807ddfb312cbac234b1b995066c77dad Mon Sep 17 00:00:00 2001
|
||||||
|
From: Matt Coleman <matt@datto.com>
|
||||||
|
Date: Thu, 7 Nov 2019 19:43:57 -0500
|
||||||
|
Subject: [PATCH] Ensure that all output reaches the client when daemonized
|
||||||
|
|
||||||
|
---
|
||||||
|
configshell/console.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/configshell/console.py b/configshell/console.py
|
||||||
|
index 8ed6b50..003a855 100644
|
||||||
|
--- a/configshell/console.py
|
||||||
|
+++ b/configshell/console.py
|
||||||
|
@@ -191,7 +191,7 @@ class Console(object):
|
||||||
|
break
|
||||||
|
else:
|
||||||
|
clean_text = text
|
||||||
|
- self.raw_write(clean_text)
|
||||||
|
+ self.raw_write(clean_text, output=self._stdout)
|
||||||
|
|
||||||
|
def indent(self, text, margin=2):
|
||||||
|
'''
|
||||||
|
--
|
||||||
|
2.42.0.windows.2
|
||||||
|
|
||||||
79
0002-Remove-epydoc-imports-and-epydoc-calls.patch
Normal file
79
0002-Remove-epydoc-imports-and-epydoc-calls.patch
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
From 2c2d91e430fe841ee0afe8deaec318b74d756cee Mon Sep 17 00:00:00 2001
|
||||||
|
From: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
||||||
|
Date: Sun, 28 Jul 2019 18:19:59 +0200
|
||||||
|
Subject: [PATCH] Remove epydoc imports and epydoc calls
|
||||||
|
|
||||||
|
Epydoc is no longer maintained and only supported for Python 2 whereas
|
||||||
|
most distributions package targetcli-fb for Python 3 (RHEL, Fedora,
|
||||||
|
Debian). As a consequence, the help messages for configshell commands
|
||||||
|
are not rendered with Epydoc on most systems and it is probably safe
|
||||||
|
to remove the Epydoc dependency entirely.
|
||||||
|
|
||||||
|
For more information, see:
|
||||||
|
|
||||||
|
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=881554
|
||||||
|
|
||||||
|
Signed-off-by: Christophe Vu-Brugier <cvubrugier@fastmail.fm>
|
||||||
|
---
|
||||||
|
configshell/console.py | 31 +++++++++----------------------
|
||||||
|
1 file changed, 9 insertions(+), 22 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configshell/console.py b/configshell/console.py
|
||||||
|
index 8ed6b50..80e723c 100644
|
||||||
|
--- a/configshell/console.py
|
||||||
|
+++ b/configshell/console.py
|
||||||
|
@@ -26,12 +26,6 @@ import tty
|
||||||
|
|
||||||
|
from .prefs import Prefs
|
||||||
|
|
||||||
|
-# avoid requiring epydoc at runtime
|
||||||
|
-try:
|
||||||
|
- import epydoc.markup.epytext
|
||||||
|
-except ImportError:
|
||||||
|
- pass
|
||||||
|
-
|
||||||
|
class Console(object):
|
||||||
|
'''
|
||||||
|
Implements various utility methods providing a console UI support toolkit,
|
||||||
|
@@ -166,19 +160,12 @@ class Console(object):
|
||||||
|
Renders and print and epytext-formatted text on the console.
|
||||||
|
'''
|
||||||
|
text = self.dedent(text)
|
||||||
|
- try:
|
||||||
|
- dom_tree = epydoc.markup.epytext.parse(text, None)
|
||||||
|
- except NameError:
|
||||||
|
- # epydoc not installed, strip markup
|
||||||
|
- dom_tree = text
|
||||||
|
- dom_tree = dom_tree.replace("B{", "")
|
||||||
|
- dom_tree = dom_tree.replace("I{", "")
|
||||||
|
- dom_tree = dom_tree.replace("C{", "")
|
||||||
|
- dom_tree = dom_tree.replace("}", "")
|
||||||
|
- dom_tree += "\n"
|
||||||
|
- except:
|
||||||
|
- self.display(text)
|
||||||
|
- raise
|
||||||
|
+ dom_tree = text
|
||||||
|
+ dom_tree = dom_tree.replace("B{", "")
|
||||||
|
+ dom_tree = dom_tree.replace("I{", "")
|
||||||
|
+ dom_tree = dom_tree.replace("C{", "")
|
||||||
|
+ dom_tree = dom_tree.replace("}", "")
|
||||||
|
+ dom_tree += "\n"
|
||||||
|
text = self.render_domtree(dom_tree)
|
||||||
|
# We need to remove the last line feed, but there might be
|
||||||
|
# escape characters after it...
|
||||||
|
@@ -412,9 +399,9 @@ class Console(object):
|
||||||
|
text = self.render_text(
|
||||||
|
childstr, styles=['underline'], todefault=True)
|
||||||
|
elif tree.tag == 'symbol':
|
||||||
|
- text = '%s' \
|
||||||
|
- % epydoc.markup.epytext.SYMBOL_TO_PLAINTEXT.get(
|
||||||
|
- childstr, childstr)
|
||||||
|
+ # Should not occur because this module does not have
|
||||||
|
+ # docstrings with symbols (e.g. S{alpha}).
|
||||||
|
+ raise NotImplementedError
|
||||||
|
elif tree.tag == 'graph':
|
||||||
|
text = '<<%s graph: %s>>' \
|
||||||
|
% (variables[0], ', '.join(variables[1:]))
|
||||||
|
--
|
||||||
|
2.42.0.windows.2
|
||||||
|
|
||||||
Binary file not shown.
@ -4,25 +4,21 @@
|
|||||||
Name: python-configshell
|
Name: python-configshell
|
||||||
Summary: Python library that provides a framework for building simple but nice CLI-based applications.
|
Summary: Python library that provides a framework for building simple but nice CLI-based applications.
|
||||||
Version: 1.1.27
|
Version: 1.1.27
|
||||||
Release: 1
|
Release: 6
|
||||||
License: ASL 2.0
|
License: ASL 2.0
|
||||||
URL: https://github.com/open-iscsi/configshell-fb
|
URL: https://github.com/open-iscsi/configshell-fb
|
||||||
Source0: %{srcname}-%{version}.tar.gz
|
Source0: https://github.com/open-iscsi/configshell-fb/archive/v1.1.27.tar.gz
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
|
Patch01: 0001-Ensure-that-all-output-reaches-the-client-when-daemo.patch
|
||||||
|
Patch02: 0002-Remove-epydoc-imports-and-epydoc-calls.patch
|
||||||
|
|
||||||
%global _description\
|
%global _description\
|
||||||
%{name} is a Python library that provides a framework for building simple but nice CLI-based applications.\
|
%{name} is a Python library that provides a framework for building simple but nice CLI-based applications.\
|
||||||
This runs with Python 2 and 2to3 is run by setup.py to run on Python 3.\
|
This runs with Python 3 and python 3 is run by setup.py to run on Python 3.\
|
||||||
|
|
||||||
%description %_description
|
%description %_description
|
||||||
|
|
||||||
%package -n python2-configshell
|
|
||||||
Summary: %summary
|
|
||||||
BuildRequires: git python2-devel
|
|
||||||
Requires: python2-pyparsing python2-urwid python2-six
|
|
||||||
|
|
||||||
%description -n python2-configshell %_description
|
|
||||||
|
|
||||||
%package -n python3-configshell
|
%package -n python3-configshell
|
||||||
Summary: %summary
|
Summary: %summary
|
||||||
BuildRequires: git python3-devel
|
BuildRequires: git python3-devel
|
||||||
@ -32,34 +28,42 @@ Requires: python3-pyparsing python3-urwid
|
|||||||
%description -n python3-configshell %_description
|
%description -n python3-configshell %_description
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version} -p1 -Sgit
|
%autosetup -n configshell-fb-%{version} -p1 -Sgit
|
||||||
|
|
||||||
rm -rf %{py3dir}
|
rm -rf %{py3dir}
|
||||||
cp -a . %{py3dir}
|
cp -a . %{py3dir}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%py2_build
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py build
|
%{__python3} setup.py build
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%install
|
%install
|
||||||
rm -rf %{buildroot}
|
rm -rf %{buildroot}
|
||||||
%py2_install
|
|
||||||
pushd %{py3dir}
|
pushd %{py3dir}
|
||||||
%{__python3} setup.py install --skip-build --root %{buildroot}
|
%{__python3} setup.py install --skip-build --root %{buildroot}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
%files -n python2-configshell
|
|
||||||
%{python2_sitelib}/*
|
|
||||||
%license COPYING
|
|
||||||
%doc README.md
|
|
||||||
|
|
||||||
%files -n python3-configshell
|
%files -n python3-configshell
|
||||||
%{python3_sitelib}/*
|
%{python3_sitelib}/*
|
||||||
%license COPYING
|
%license COPYING
|
||||||
%doc README.md
|
%doc README.md
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Nov 28 2023 liubo <liubo1@xfusion.com> - 1.1.27-6
|
||||||
|
- Remove epydoc imports and epydoc calls
|
||||||
|
|
||||||
|
* Wed Nov 1 2023 liubo <liubo1@xfusion.com> - 1.1.27-5
|
||||||
|
- Repair log message
|
||||||
|
|
||||||
|
* Fri Oct 13 2023 liubo <liubo1@xfusion.com> - 1.1.27-4
|
||||||
|
- Ensure that all output reaches the client when daemonized
|
||||||
|
|
||||||
|
* Wed Oct 21 2020 zhangtao <zhangtao221@huawei.com> - 1.1.27-3
|
||||||
|
- delete python2
|
||||||
|
|
||||||
|
* Wed Sep 9 2020 liuweibo <liuweibo10@huawei.com> - 1.1.27-2
|
||||||
|
- Fix Source0
|
||||||
|
|
||||||
* Tue Nov 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.27-1
|
* Tue Nov 12 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.1.27-1
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
BIN
v1.1.27.tar.gz
Normal file
BIN
v1.1.27.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user