diff --git a/.gitignore b/.gitignore
index 1e71fd2..e794a82 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
epydoc-3.0.1.tar.gz
+/epydoc-3.0.1.20090203svn.tar.gz
diff --git a/epydoc-3.0.1svn1812-fix-relative-import.patch b/epydoc-3.0.1svn1812-fix-relative-import.patch
new file mode 100644
index 0000000..3c94471
--- /dev/null
+++ b/epydoc-3.0.1svn1812-fix-relative-import.patch
@@ -0,0 +1,17 @@
+--- epydoc/docparser.py.orig 2011-05-30 13:26:50.000000000 +0100
++++ 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
diff --git a/epydoc-3.0.1svn1812-make-suppress-timestamp-the-default.patch b/epydoc-3.0.1svn1812-make-suppress-timestamp-the-default.patch
new file mode 100644
index 0000000..0109150
--- /dev/null
+++ b/epydoc-3.0.1svn1812-make-suppress-timestamp-the-default.patch
@@ -0,0 +1,140 @@
+From f8337105832d7d22d22dc7dcdb00630f690ba9ab Mon Sep 17 00:00:00 2001
+From: Benedikt Morbach
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/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
+ * re.sub
",
+ if a module defines the "__all__
" variable, then its
+ contents are used to decide which objects are private.
+
+-A timestamp below the bottom navigation bar indicates when each +-page was last updated.
++If --include-timestamp was passed, a timestamp below the bottom navigation bar indicates ++when each page was last updated.
+ ''' +-- +1.9.3 + diff --git a/epydoc-3.0.1svn1812-png-default.patch b/epydoc-3.0.1svn1812-png-default.patch new file mode 100644 index 0000000..dbc5ee5 --- /dev/null +++ b/epydoc-3.0.1svn1812-png-default.patch @@ -0,0 +1,12 @@ +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, diff --git a/epydoc.spec b/epydoc.spec index 299f05f..30a0a13 100644 --- a/epydoc.spec +++ b/epydoc.spec @@ -2,16 +2,18 @@ Summary: Automatic API documentation generation tool for Python Name: epydoc -Version: 3.0.1 -Release: 16%{?dist} +Version: 3.0.1.20090203svn +Release: 1%{?dist} Group: Development/Tools License: MIT URL: http://epydoc.sourceforge.net/ Source0: http://dl.sf.net/epydoc/epydoc-%{version}.tar.gz Source1: epydocgui.desktop Patch0: epydoc-3.0.1-nohashbang.patch -Patch1: epydoc-3.0.1-giftopng.patch +Patch1: epydoc-3.0.1svn1812-png-default.patch Patch2: epydoc-3.0.1-new-docutils.patch +Patch3: epydoc-3.0.1svn1812-make-suppress-timestamp-the-default.patch +Patch4: epydoc-3.0.1svn1812-fix-relative-import.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Requires: tkinter # Needed for some outputs, like --pdf (#522249) @@ -30,20 +32,31 @@ information about specific fields, such as parameters and instance variables. Epydoc also understands docstrings written in ReStructuredText, Javadoc, and plaintext. +%package doc +Summary: Documentation for epydoc +Requires: %{name} = %{version}-%{release} +%description doc +epydoc-doc package contains documentation. %prep -%setup -q -%patch0 -p1 -b .nohashbang -%patch1 -p1 -b .giftopng -%patch2 -p1 -b .new-docutils +%setup -q +# Clean scm files +rm -rf epydoc/doc/.cvsignore +%patch0 -p1 -d epydoc/src/ -b .nohashbang +%patch1 -p1 -b .default-png +%patch2 -p1 -d epydoc/src/ -b .new-docutils +%patch3 -p1 -b .no-timestamp +%patch4 -p0 -d epydoc/src/ -b .fix-relative-import %build +cd epydoc/src/ %{__python} setup.py build %install %{__rm} -rf %{buildroot} +cd epydoc/src/ %{__python} setup.py install -O1 --skip-build --root=%{buildroot} desktop-file-install \ @@ -52,12 +65,13 @@ desktop-file-install \ --mode=0644 \ %{SOURCE1} +# Prevent having *.pyc and *.pyo in _bindir +%{__mv} %{buildroot}%{_bindir}/apirst2html.py %{buildroot}%{_bindir}/apirst2html + # Also install the man pages %{__mkdir_p} %{buildroot}%{_mandir}/man1 -%{__install} -p -m 0644 man/*.1 %{buildroot}%{_mandir}/man1/ +%{__install} -p -m 0644 ../man/*.1 %{buildroot}%{_mandir}/man1/ -# Prevent having *.pyc and *.pyo in _bindir -%{__mv} %{buildroot}%{_bindir}/apirst2html.py %{buildroot}%{_bindir}/apirst2html %clean @@ -66,7 +80,7 @@ desktop-file-install \ %files %defattr(-,root,root,-) -%doc LICENSE.txt README.txt doc/ +%doc epydoc/src/LICENSE.txt epydoc/src/README.txt %{_bindir}/apirst2html %{_bindir}/epydoc %{_bindir}/epydocgui @@ -75,8 +89,18 @@ desktop-file-install \ %{_datadir}/applications/epydocgui.desktop %{_mandir}/man1/*.1* +%files doc +%doc epydoc/doc + %changelog +* Fri Oct 02 2015 Athmane Madjoudj