This commit is contained in:
daidai_is_here 2020-01-10 16:19:49 +08:00
parent 787702a767
commit 1a50a334c2
9 changed files with 5 additions and 239 deletions

View File

@ -1,29 +0,0 @@
From b293e11299566005b5d918c735bdf9c0ab5ded6f Mon Sep 17 00:00:00 2001
From: Lubomir Rintel <lkundrak@v3.sk>
Date: Thu, 1 Apr 2010 20:23:12 +0200
Subject: [PATCH] Fix restructuredtext formatting for python-docutils-0.6
---
epydoc/markup/restructuredtext.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/epydoc/markup/restructuredtext.py b/epydoc/markup/restructuredtext.py
index 8b6ac04..4726cb5 100644
--- a/epydoc/markup/restructuredtext.py
+++ b/epydoc/markup/restructuredtext.py
@@ -304,10 +304,10 @@ class _SummaryExtractor(NodeVisitor):
# Extract the first sentence.
for child in node:
if isinstance(child, docutils.nodes.Text):
- m = self._SUMMARY_RE.match(child.data)
+ m = self._SUMMARY_RE.match(child)
if m:
summary_pieces.append(docutils.nodes.Text(m.group(1)))
- other = child.data[m.end():]
+ other = child[m.end():]
if other and not other.isspace():
self.other_docs = True
break
--
1.7.0.1

View File

@ -1,8 +0,0 @@
diff -Naupr epydoc-3.0.1.orig/epydoc/gui.py epydoc-3.0.1/epydoc/gui.py
--- epydoc-3.0.1.orig/epydoc/gui.py 2008-01-30 14:06:15.000000000 +0100
+++ epydoc-3.0.1/epydoc/gui.py 2008-03-22 22:00:49.000000000 +0100
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
#
# objdoc: epydoc command-line interface
# Edward Loper

Binary file not shown.

BIN
epydoc-3.0.1.tar.gz Normal file

Binary file not shown.

View File

@ -1,17 +0,0 @@
--- a/epydoc/docparser.py.orig 2011-05-30 13:26:50.000000000 +0100
+++ b/epydoc/docparser.py 2011-05-30 13:52:54.000000000 +0100
@@ -860,7 +860,13 @@
# >>> from sys import *
elif rhs == [(token.OP, '*')]:
- src_name = parse_dotted_name(lhs)
+ # Allow relative imports in this case, as per PEP 328
+ # e.g. from .foo import *
+ if (lhs[0] == (token.OP, '.')):
+ src_name = parse_dotted_name(lhs,
+ parent_name=parent_docs[-1].canonical_name)
+ else:
+ src_name = parse_dotted_name(lhs)
_process_fromstar_import(src_name, parent_docs)
# >>> from os.path import join, split

View File

@ -1,140 +0,0 @@
From f8337105832d7d22d22dc7dcdb00630f690ba9ab Mon Sep 17 00:00:00 2001
From: Benedikt Morbach <bmorbach@redhat.com>
Date: Wed, 23 Jul 2014 18:02:53 +0200
Subject: [PATCH] make --suppress-timestamp the default
add option to include timestamp
---
epydoc/doc/manual-usage.txt | 4 ++--
epydoc/doc/using.html | 5 +++--
epydoc/man/epydoc.1 | 6 +++++-
epydoc/src/epydoc/cli.py | 10 +++++++---
epydoc/src/epydoc/docwriter/html.py | 2 +-
epydoc/src/epydoc/docwriter/html_css.py | 4 ++--
epydoc/src/epydoc/docwriter/html_help.py | 4 ++--
7 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/epydoc/doc/manual-usage.txt b/epydoc/doc/manual-usage.txt
index 5a845dc..575f212 100644
--- a/epydoc/doc/manual-usage.txt
+++ b/epydoc/doc/manual-usage.txt
@@ -307,8 +307,8 @@ The following list describes each of the files generated by epydoc:
``epydoc-log.html``
A page with the log of the epydoc execution. It is available clicking on
the timestamp below each page, if the documentation was created using the
- ``--include-log`` option. The page also contains the list of the options
- enabled when the documentation was created.
+ ``--include-log`` and ``--include-timestamp`` options. The page also
+ contains the list of the options enabled when the documentation was created.
``api-objects.txt``
A text file containing each available item and the URL where it is
diff --git a/epydoc/doc/using.html b/epydoc/doc/using.html
index 82c4bf5..76d8a0e 100644
--- a/epydoc/doc/using.html
+++ b/epydoc/doc/using.html
@@ -384,8 +384,9 @@ class directly. </p>
<li><b><code>epydoc-log.html</code></b>
A page with the log of the epydoc execution. It is available clicking on the
timestamp below each page, if the documentation was created using the
- <code>--include-log</code> option. The page also contains the list of the
- options enabled when the documentation was created. </li>
+ <code>--include-log</code> and <code>--include-timestamp</code> options.
+ The page also contains the list of the options enabled when the documentation
+ was created. </li>
<li><b><code>api-objects.txt</code></b>
A text file containing each available item and the URL where it is
diff --git a/epydoc/man/epydoc.1 b/epydoc/man/epydoc.1
index 5fbfcf9..4d527dc 100644
--- a/epydoc/man/epydoc.1
+++ b/epydoc/man/epydoc.1
@@ -293,10 +293,14 @@ documentation, instead of including them in the documentation for
their modules. This creates a separate LaTeX file for each class, so
it can also be useful if you want to include the documentation for one
or two classes as sections of your own LaTeX document.
+.\" --include-timestamp
+.TP
+.B \-\-include\-timestamp
+Include a timestamp in the generated output.
.\" --suppress-timestamp
.TP
.B \-\-suppress\-timestamp
-Do not include a timestamp in the generated output.
+ignored, only exists for backwards compatibility. (it is now the default)
.RE
.PP
.\"--------------------------------------------------
diff --git a/epydoc/src/epydoc/cli.py b/epydoc/src/epydoc/cli.py
index d7a308c..fbbe5de 100644
--- a/epydoc/src/epydoc/cli.py
+++ b/epydoc/src/epydoc/cli.py
@@ -152,7 +152,7 @@ def option_defaults():
fail_on=None, exclude=[], exclude_parse=[], exclude_introspect=[],
external_api=[], external_api_file=[], external_api_root=[],
redundant_details=False, src_code_tab_width=8, verbosity=0,
- include_timestamp=True, target={}, default_target=None,
+ include_timestamp=False, target={}, default_target=None,
pdfdriver='auto', show_submodule_list=True, inherit_from_object=False)
# append_const is not defined in py2.3 or py2.4, so use a callback
@@ -404,9 +404,13 @@ def parse_arguments():
help=("When generating HTML output, sets the number of spaces "
"each tab in source code listings is replaced with."))
+ output_group.add_option('--include-timestamp',
+ action='store_true', dest='include_timestamp',
+ help=("Include a timestamp in the generated output."))
+
output_group.add_option('--suppress-timestamp',
- action='store_false', dest='include_timestamp',
- help=("Do not include a timestamp in the generated output."))
+ action='store_false', dest='ignored_options',
+ help=("Ignored, only exists for backwards compatibility. (this is now the default)"))
# The group of external API options.
# Skip if the module couldn't be imported (usually missing docutils)
diff --git a/epydoc/src/epydoc/docwriter/html.py b/epydoc/src/epydoc/docwriter/html.py
index b6be5f4..e496f56 100644
--- a/epydoc/src/epydoc/docwriter/html.py
+++ b/epydoc/src/epydoc/docwriter/html.py
@@ -361,7 +361,7 @@ class HTMLWriter:
self._include_log = kwargs.get('include_log', False)
"""Are we generating an HTML log page?"""
- self._include_timestamp = kwargs.get('include_timestamp', True)
+ self._include_timestamp = kwargs.get('include_timestamp', False)
"""Include a timestamp on the generated docs?"""
self._src_code_tab_width = kwargs.get('src_code_tab_width', 8)
diff --git a/epydoc/src/epydoc/docwriter/html_css.py b/epydoc/src/epydoc/docwriter/html_css.py
index 53923aa..9b0c837 100644
--- a/epydoc/src/epydoc/docwriter/html_css.py
+++ b/epydoc/src/epydoc/docwriter/html_css.py
@@ -82,8 +82,8 @@ a.link { font-family: monospace; }
* variables and to show/hide frames; and a page title (using
* <h1>). The page title may be followed by a link to the
* corresponding source code (using 'span.codelink').
- * - The footer consists of a navigation bar, a timestamp, and a
- * pointer to epydoc's homepage.
+ * - The footer consists of a navigation bar, a timestamp
+ * (if --include-timestamp was passed), and a pointer to epydoc's homepage.
*/
h1.epydoc { margin: 0; font-size: +140%; font-weight: bold; }
h2.epydoc { font-size: +130%; font-weight: bold; }
diff --git a/epydoc/src/epydoc/docwriter/html_help.py b/epydoc/src/epydoc/docwriter/html_help.py
index 92653b4..50b02a1 100644
--- a/epydoc/src/epydoc/docwriter/html_help.py
+++ b/epydoc/src/epydoc/docwriter/html_help.py
@@ -185,6 +185,6 @@ are private objects; but "<code>re.sub</code>",
if a module defines the "<code>__all__</code>" variable, then its
contents are used to decide which objects are private. </p>
-<p> A timestamp below the bottom navigation bar indicates when each
-page was last updated. </p>
+<p> If --include-timestamp was passed, a timestamp below the bottom navigation bar indicates
+when each page was last updated. </p>
'''
--
1.9.3

View File

@ -1,12 +0,0 @@
diff -ru epydoc-code.orig/epydoc/src/epydoc/docwriter/dotgraph.py epydoc-code/epydoc/src/epydoc/docwriter/dotgraph.py
--- epydoc-code.orig/epydoc/src/epydoc/docwriter/dotgraph.py 2015-10-02 20:18:48.213890123 +0100
+++ epydoc-code/epydoc/src/epydoc/docwriter/dotgraph.py 2015-10-02 20:33:00.582257332 +0100
@@ -93,7 +93,7 @@
"""The default minimum size in inches (width,height) for graphs
when rendering with `to_html()`"""
- DEFAULT_HTML_IMAGE_FORMAT = 'gif'
+ DEFAULT_HTML_IMAGE_FORMAT = 'png'
"""The default format used to generate images by `to_html()`"""
def __init__(self, title, body='', node_defaults=None,

View File

@ -1,17 +1,10 @@
Name: epydoc
Version: 3.0.1.20090203svn
Version: 3.0.1
Release: 11
Summary: API Documentation Generation Tool
License: MIT
URL: http://epydoc.sourceforge.net/
Source0: http://dl.sf.net/epydoc/epydoc-%{version}.tar.gz
Source1: epydocgui.desktop
Patch0001: epydoc-3.0.1-nohashbang.patch
Patch0002: epydoc-3.0.1svn1812-png-default.patch
Patch0003: epydoc-3.0.1-new-docutils.patch
Patch0004: epydoc-3.0.1svn1812-make-suppress-timestamp-the-default.patch
Patch0005: epydoc-3.0.1svn1812-fix-relative-import.patch
Source0: https://sourceforge.net/projects/epydoc/files/epydoc/${version}/epydoc-%{version}.tar.gz
Recommends: tex(dvips) tex(latex)
BuildRequires: python2-devel desktop-file-utils
@ -42,40 +35,27 @@ This package provides Graphical user interface for epydoc.
%prep
%setup -q
rm -rf epydoc/doc/.cvsignore
%patch0001 -p1 -d epydoc/src/ -b .nohashbang
%patch0002 -p1 -b .default-png
%patch0003 -p1 -d epydoc/src/ -b .new-docutils
%patch0004 -p1 -b .no-timestamp
%patch0005 -p1 -d epydoc/src/ -b .fix-relative-import
%build
cd epydoc/src/
%py2_build
%install
cd epydoc/src/
%py2_install
desktop-file-install --vendor="" --dir=%{buildroot}%{_datadir}/applications --mode=0644 %{SOURCE1}
mv %{buildroot}%{_bindir}/apirst2html.py %{buildroot}%{_bindir}/apirst2html
install -Dt %{buildroot}%{_mandir}/man1/ -p -m 0644 ../man/*.1
%files
%doc epydoc/src/README.txt epydoc/src/LICENSE.txt
%doc README.txt LICENSE.txt
%{_bindir}/{apirst2html,epydoc}
%{python2_sitelib}/epydoc/
%{python2_sitelib}/epydoc-*.egg-info
%files gui
%{_bindir}/epydocgui
%{_datadir}/applications/epydocgui.desktop
%files help
%doc epydoc/doc
%{_mandir}/man1/*
%doc epydoc/*
%changelog
* Tue Dec 31 2019 wangzhishun <wangzhishun1@huawei.com> - 3.0.1.20090203svn-11
* Tue Dec 31 2019 wangzhishun <wangzhishun1@huawei.com> - 3.0.1-11
- Package init

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Encoding=UTF-8
Name=Epydoc
Comment=Python API documentation generator
Exec=epydocgui
Type=Application
Terminal=false
Categories=Application;Development;