File python-pydoctor.spec of Package python-pydoctor

#
# spec file for package python-pydoctor
#
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#

%define modname pydoctor
Name:           python-%{modname}
Version:        0.4
Release:        1
License:        BSD
Summary:        An API Documentation Tool for Python
Url:            http://codespeak.net/~mwh/pydoctor/
Group:          Development/Tools/Doc Generators
Source:         https://pypi.python.org/packages/source/p/pydoctor/pydoctor-%{version}.tar.gz
Patch:          no_optimize.patch
BuildRequires:  python-devel
Requires:       epydoc
Requires:       python-nevow
Requires:       python-zopeinterface
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch:      noarch
%endif

%description
This is 'pydoctor', an API documentation generator that works by
static analysis.

It was written primarily to replace epydoc for the purposes of the
Twisted project as epydoc has difficulties with zope.interface.  If it
happens to work for your code too, that's a nice bonus at this stage :)

pydoctor puts a fair bit of effort into resolving imports and
computing inheritance hierarchies and, as it aims at documenting
Twisted, knows about zope.interface's declaration API and can present
information about which classes implement which interface, and vice
versa.

%prep
%setup -q -n %{modname}-%{version}
%patch -p1

%build
python setup.py build

%install
python setup.py install --prefix=%{_prefix} --root=%{buildroot}
# Remove backup file
rm %{buildroot}%{python_sitelib}/pydoctor/templates/summary.html.~1~

%files
%defattr(-,root,root)
%doc doc/* LICENSE.txt README.txt
%{_bindir}/pydoctor
%{python_sitelib}

%changelog
openSUSE Build Service is sponsored by