summaryrefslogtreecommitdiff
path: root/redhat/python-configshell.spec.tmpl
blob: b00ac09959a35f8826b7716f603c5d0c600481fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%define oname configshell

Name:           python-configshell
License:        AGPLv3
Group:          System Environment/Libraries
Summary:        A framework to implement simple but nice CLIs.
Version:        VERSION
Release:        1%{?dist}
URL:            http://www.risingtidesystems.com/git/
Source:         %{oname}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-rpmroot
BuildArch:      noarch
BuildRequires:  python-devel, epydoc, python-simpleparse
Requires:       python-simpleparse, python-urwid >= 0.9.9, epydoc
Vendor:         RisingTide Systems

%description
A framework to implement simple but nice command-line interfaces.

%package doc
Summary:       PDF and HTML API reference for python-configshell.
Group:         Documentation
BuildRequires: epydoc

%description doc
PDF and HTML API reference for python-configshell.

%prep
%setup -q -n %{oname}-%{version}

%build
%{__python} setup.py build
mkdir -p doc/pdf
epydoc --no-sourcecode --pdf -n %{oname} --exclude configobj %{oname}/*.py
mv pdf/api.pdf doc/pdf/%{oname}_API_Documentation.pdf
epydoc --no-sourcecode --html -n %{oname} --exclude configobj %{oname}/*.py
sed -i "s/<\?/<!/g" html/*.html
sed -i "s/\?>/>/g" html/*.html
mv html doc/

%install
rm -rf %{buildroot}
%{__python} setup.py install --skip-build --root %{buildroot}
mkdir -p %{buildroot}/usr/share/doc/python-configshell-doc-%{version}
cp -r doc/* %{buildroot}/usr/share/doc/python-configshell-doc-%{version}/

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%{python_sitelib}
%doc examples COPYING README

%files doc
%defattr(-,root,root,-)
/usr/share/doc/python-configshell-doc-%{version}

%changelog