Compare commits

..

10 Commits

Author SHA1 Message Date
openeuler-ci-bot
ec1aa8cb3b
!22 Remove epydoc imports and epydoc calls
From: @wang--ge 
Reviewed-by: @lyn1001 
Signed-off-by: @lyn1001
2023-11-29 09:38:46 +00:00
wang--ge
b36b5ce04a Remove epydoc imports and epydoc calls 2023-11-29 10:25:46 +08:00
openeuler-ci-bot
bfbad15695
!18 Repair log message
From: @lb1107039128 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-11-02 03:40:02 +00:00
liubo
2dcce1feb7 Repair log message
Signed-off-by: liubo <liubo1@xfusion.com>
2023-11-01 15:26:34 +08:00
openeuler-ci-bot
0263da9ac5
!13 Ensure that all output reaches the client when daemonized
From: @lb1107039128 
Reviewed-by: @Charlie_li 
Signed-off-by: @Charlie_li
2023-10-16 06:44:02 +00:00
liubo
9f6d680920 Ensure that all output reaches the client when daemonized
Signed-off-by: liubo <liubo1@xfusion.com>
2023-10-13 16:08:51 +08:00
openeuler-ci-bot
524c70d42d !7 remove python2,don't support python2 anymore
From: @zhangtao2020
Reviewed-by: @small_leek
Signed-off-by: @small_leek
2020-10-30 09:56:54 +08:00
zhangtao2020
212ed6be0c delete python2 2020-10-29 14:48:43 +08:00
openeuler-ci-bot
d12735a750 !2 Fix source0
Merge pull request !2 from alan/master
2020-09-09 11:45:30 +08:00
kkkl12
12ef1e1dd9 Fix source0 2020-09-09 10:37:47 +08:00
5 changed files with 126 additions and 18 deletions

View File

@ -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

View 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.

View File

@ -4,25 +4,21 @@
Name: python-configshell
Summary: Python library that provides a framework for building simple but nice CLI-based applications.
Version: 1.1.27
Release: 1
Release: 6
License: ASL 2.0
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
Patch01: 0001-Ensure-that-all-output-reaches-the-client-when-daemo.patch
Patch02: 0002-Remove-epydoc-imports-and-epydoc-calls.patch
%global _description\
%{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
%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
Summary: %summary
BuildRequires: git python3-devel
@ -32,34 +28,42 @@ Requires: python3-pyparsing python3-urwid
%description -n python3-configshell %_description
%prep
%autosetup -n %{srcname}-%{version} -p1 -Sgit
%autosetup -n configshell-fb-%{version} -p1 -Sgit
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
%py2_build
pushd %{py3dir}
%{__python3} setup.py build
popd
%install
rm -rf %{buildroot}
%py2_install
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root %{buildroot}
popd
%files -n python2-configshell
%{python2_sitelib}/*
%license COPYING
%doc README.md
%files -n python3-configshell
%{python3_sitelib}/*
%license COPYING
%doc README.md
%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
- Package init

BIN
v1.1.27.tar.gz Normal file

Binary file not shown.