Blob Blame History Raw
%{!?python_sitelib: %define python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")}

Summary: Edward Loper's Python API documentation generation tool
Name: epydoc
Version: 2.1
Release: 3
Group: Development/Tools
License: MIT
URL: http://epydoc.sourceforge.net/
Source0: http://dl.sf.net/epydoc/epydoc-%{version}.tar.gz
Source1: epydocgui.desktop
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
Requires: tkinter
BuildRequires: python desktop-file-utils
BuildArch: noarch

%description
Epydoc  is a tool for generating API documentation for Python modules,
based  on their docstrings. For an example of epydoc's output, see the
API  documentation for epydoc itself (html, pdf). A lightweight markup
language  called  epytext can be used to format docstrings, and to add
information  about  specific  fields,  such as parameters and instance
variables.    Epydoc    also   understands   docstrings   written   in
ReStructuredText, Javadoc, and plaintext.


%prep
%setup -q


%build
%{__python} setup.py build


%install
%{__rm} -rf %{buildroot}
%{__python} setup.py install -O1 --skip-build --root=%{buildroot}

desktop-file-install \
  --vendor=fedora \
  --dir=%{buildroot}%{_datadir}/applications \
  --mode=644 \
  --add-category=X-Fedora \
  %{SOURCE1}

# Also install the man pages
%{__install} -Dpm 644 man/epydoc.1    %{buildroot}%{_mandir}/man1/epydoc.1
%{__install} -Dpm 644 man/epydocgui.1 %{buildroot}%{_mandir}/man1/epydocgui.1


%clean
%{__rm} -rf %{buildroot}


%files
%defattr(-, root, root, 0755)
%doc LICENSE.TXT README.TXT doc/
%{_bindir}/epydoc
%{_bindir}/epydocgui
%dir %{python_sitelib}/epydoc
%{python_sitelib}/epydoc/*.py
%{python_sitelib}/epydoc/*.pyc
%ghost %{python_sitelib}/epydoc/*.pyo
%dir %{python_sitelib}/epydoc/markup
%{python_sitelib}/epydoc/markup/*.py
%{python_sitelib}/epydoc/markup/*.pyc
%ghost %{python_sitelib}/epydoc/markup/*.pyo
%dir %{python_sitelib}/epydoc/test
%{python_sitelib}/epydoc/test/*.py
%{python_sitelib}/epydoc/test/*.pyc
%ghost %{python_sitelib}/epydoc/test/*.pyo
%{_datadir}/applications/*epydocgui.desktop
%{_mandir}/man1/epydoc.1*
%{_mandir}/man1/epydocgui.1*


%changelog
* Mon Dec 20 2004 Ville Skyttä <ville.skytta at iki.fi> - 2.1-3
- Change to noarch.
- Get Python site-packages dir from distutils, should fix x86_64 build.
- Require python-abi and tkinter.
- %%ghost'ify *.pyo.
- Fix man page permissions.
- Add menu entry for epydocgui.

* Tue Nov 16 2004 Matthias Saou <http://freshrpms.net/> 2.1-2
- Bump release to provide Extras upgrade path.

* Thu Oct 21 2004 Matthias Saou <http://freshrpms.net/> 2.1-1
- Picked up and rebuilt.
- Added doc and man pages.

* Fri May 07 2004 Thomas Vander Stichele <thomas at apestaart dot org>
- 2.1-0.fdr.1: Initial package