Initial checkin (#744342)
Signed-off-by: Andy Grover <agrover@redhat.com>
This commit is contained in:
parent
0aba48238d
commit
aba5a43842
1
.gitignore
vendored
1
.gitignore
vendored
@ -0,0 +1 @@
|
|||||||
|
/configshell-1.99.1.git987b63b.tar.gz
|
13
python-configshell-git-version.patch
Normal file
13
python-configshell-git-version.patch
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
diff --git a/configshell/__init__.py b/configshell/__init__.py
|
||||||
|
index 9bfcdb3..1614267 100644
|
||||||
|
--- a/configshell/__init__.py
|
||||||
|
+++ b/configshell/__init__.py
|
||||||
|
@@ -21,7 +21,7 @@ from shell import ConfigShell
|
||||||
|
from node import ConfigNode, ExecutionError
|
||||||
|
from prefs import Prefs
|
||||||
|
|
||||||
|
-__version__ = 'GIT_VERSION'
|
||||||
|
+__version__ = '987b63b'
|
||||||
|
__author__ = "Jerome Martin <jxm@risingtidesystems.com>"
|
||||||
|
__url__ = "http://www.risingtidesystems.com"
|
||||||
|
__description__ = "A framework to implement simple but nice CLIs."
|
50
python-configshell-remove-epydoc-dep.patch
Normal file
50
python-configshell-remove-epydoc-dep.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
From 06b7577eec64de5cca72496127fc0cdde4195c7a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Andy Grover <agrover@redhat.com>
|
||||||
|
Date: Thu, 25 Aug 2011 13:39:15 -0700
|
||||||
|
Subject: [PATCH] Do not require epydoc at runtime
|
||||||
|
|
||||||
|
It's a little excessive to require the entire epydoc package so that
|
||||||
|
configshell can output italic/bold help text. If it's present, use it,
|
||||||
|
but otherwise just print plaintext.
|
||||||
|
|
||||||
|
Signed-off-by: Andy Grover <agrover@redhat.com>
|
||||||
|
---
|
||||||
|
configshell/console.py | 15 ++++++++++++++-
|
||||||
|
1 files changed, 14 insertions(+), 1 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/configshell/console.py b/configshell/console.py
|
||||||
|
index 52558dd..a6871e1 100644
|
||||||
|
--- a/configshell/console.py
|
||||||
|
+++ b/configshell/console.py
|
||||||
|
@@ -23,7 +23,12 @@ import prefs
|
||||||
|
import struct
|
||||||
|
import termios
|
||||||
|
import textwrap
|
||||||
|
-import epydoc.markup.epytext
|
||||||
|
+
|
||||||
|
+# avoid requiring epydoc at runtime
|
||||||
|
+try:
|
||||||
|
+ import epydoc.markup.epytext
|
||||||
|
+except ImportError:
|
||||||
|
+ pass
|
||||||
|
|
||||||
|
class Console(object):
|
||||||
|
'''
|
||||||
|
@@ -150,6 +155,14 @@ class Console(object):
|
||||||
|
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
|
||||||
|
--
|
||||||
|
1.7.1
|
||||||
|
|
70
python-configshell.spec
Normal file
70
python-configshell.spec
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
# Copyright 2011, Red Hat
|
||||||
|
|
||||||
|
%define oname configshell
|
||||||
|
|
||||||
|
Name: python-configshell
|
||||||
|
License: AGPLv3
|
||||||
|
Group: System Environment/Libraries
|
||||||
|
Summary: A framework to implement simple but nice CLIs
|
||||||
|
Version: 1.99.1.git987b63b
|
||||||
|
Release: 5%{?dist}
|
||||||
|
# placeholder URL and source entries
|
||||||
|
# archive created using:
|
||||||
|
# git clone git://risingtidesystems.com/configshell.git
|
||||||
|
# cd configshell
|
||||||
|
# git archive 987b63b --prefix configshell-%{version}/ | gzip > configshell-%{version}.tar.gz
|
||||||
|
URL: http://www.risingtidesystems.com/git/
|
||||||
|
Source: %{oname}-%{version}.tar.gz
|
||||||
|
Patch1: %{name}-git-version.patch
|
||||||
|
Patch2: %{name}-remove-epydoc-dep.patch
|
||||||
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
BuildArch: noarch
|
||||||
|
BuildRequires: python-devel epydoc python-simpleparse python-urwid
|
||||||
|
Requires: python-simpleparse python-urwid
|
||||||
|
|
||||||
|
%description
|
||||||
|
A framework to implement simple but nice configuration-oriented
|
||||||
|
command-line interfaces.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q -n %{oname}-%{version}
|
||||||
|
%patch1 -p1
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
%{__python} setup.py build
|
||||||
|
|
||||||
|
%install
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
%{__python} setup.py install --skip-build --root %{buildroot}
|
||||||
|
|
||||||
|
|
||||||
|
%clean
|
||||||
|
rm -rf %{buildroot}
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%{python_sitelib}
|
||||||
|
%doc COPYING README
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Sep 23 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git987b63b-5
|
||||||
|
* Rebuild
|
||||||
|
|
||||||
|
* Thu Aug 25 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git987b63b-4
|
||||||
|
- Add patch
|
||||||
|
- python-configshell-remove-epydoc-dep.patch
|
||||||
|
|
||||||
|
* Wed Aug 17 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git987b63b-3
|
||||||
|
- Address comments from spec review
|
||||||
|
- drop examples/myshell from doc, it hasn't been updated for API change
|
||||||
|
- Fully document procedure to generate source .tar.gz
|
||||||
|
- Remove "." from summary
|
||||||
|
- Remove commented-out spec todos and other cruft
|
||||||
|
|
||||||
|
* Mon Aug 1 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git987b63b-2
|
||||||
|
- Update to latest git version
|
||||||
|
- Add urwid builddep
|
||||||
|
|
||||||
|
* Tue May 10 2011 Andy Grover <agrover@redhat.com> - 1.99.1.git987b63b-1
|
||||||
|
- Initial packaging
|
Loading…
Reference in New Issue
Block a user