[Python-modules-commits] r24644 - in packages/sphinx/trunk/debian (4 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Tue Jun 4 16:33:22 UTC 2013


    Date: Tuesday, June 4, 2013 @ 16:33:19
  Author: jwilk
Revision: 24644

Rename skiptest_latex.diff as skiptest.diff; fix more cases when a missing tool was silently ignored.

Added:
  packages/sphinx/trunk/debian/patches/skiptest.diff
    (from rev 24642, packages/sphinx/trunk/debian/patches/skiptest_latex.diff)
Modified:
  packages/sphinx/trunk/debian/changelog
  packages/sphinx/trunk/debian/patches/series
Deleted:
  packages/sphinx/trunk/debian/patches/skiptest_latex.diff

Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog	2013-06-04 16:03:37 UTC (rev 24643)
+++ packages/sphinx/trunk/debian/changelog	2013-06-04 16:33:19 UTC (rev 24644)
@@ -10,8 +10,10 @@
     globaltoc and hidden toctree causing an exception (closes: #706586).
   * Add patch (fix_missing_citation_target_assert.diff) to fix missing
     citation target causing AssertionError (closes: #706565).
+  * Rename skiptest_latex.diff as skiptest.diff; fix more cases when a missing
+    tool was silently ignored.
 
- -- Jakub Wilk <jwilk at debian.org>  Tue, 04 Jun 2013 17:24:24 +0200
+ -- Jakub Wilk <jwilk at debian.org>  Tue, 04 Jun 2013 18:05:29 +0200
 
 sphinx (1.2~b1+dfsg-1) experimental; urgency=low
 

Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series	2013-06-04 16:03:37 UTC (rev 24643)
+++ packages/sphinx/trunk/debian/patches/series	2013-06-04 16:33:19 UTC (rev 24644)
@@ -3,7 +3,7 @@
 initialize_autodoc.diff
 sphinxcontrib_namespace.diff
 python3_test_build_dir.diff
-skiptest_latex.diff
+skiptest.diff
 parallel_2to3.diff
 no_external_css.diff
 fix_copying_imgs_singlehtml_builder.diff

Copied: packages/sphinx/trunk/debian/patches/skiptest.diff (from rev 24642, packages/sphinx/trunk/debian/patches/skiptest_latex.diff)
===================================================================
--- packages/sphinx/trunk/debian/patches/skiptest.diff	                        (rev 0)
+++ packages/sphinx/trunk/debian/patches/skiptest.diff	2013-06-04 16:33:19 UTC (rev 24644)
@@ -0,0 +1,67 @@
+Description: raise SkipTest if some optional software is not found
+Author: Jakub Wilk <jwilk at debian.org>
+Forwarded: no
+Last-Update: 2013-06-04
+
+--- a/tests/test_build_latex.py
++++ b/tests/test_build_latex.py
+@@ -18,6 +18,7 @@
+ from sphinx.writers.latex import LaTeXTranslator
+ 
+ from util import *
++from util import SkipTest
+ from test_build_html import ENV_WARNINGS
+ 
+ 
+@@ -69,17 +70,17 @@
+             return True
+ 
+     if kpsetest('article.sty') is None:
+-        print >>sys.stderr, \
+-              'info: not running latex, it doesn\'t seem to be installed'
+-        return
++        raise SkipTest(
++              'not running latex, it doesn\'t seem to be installed'
++        )
+     for filename in ['fancyhdr.sty', 'fancybox.sty', 'titlesec.sty',
+                      'amsmath.sty', 'framed.sty', 'color.sty', 'fancyvrb.sty',
+                      'threeparttable.sty']:
+         if not kpsetest(filename):
+-            print >>sys.stderr, \
+-                  'info: not running latex, the %s package doesn\'t ' \
++            raise SkipTest(
++                  'not running latex, the %s package doesn\'t ' \
+                   'seem to be installed' % filename
+-            return
++            )
+ 
+     # now, try to run latex over it
+     cwd = os.getcwd()
+@@ -89,7 +90,7 @@
+             p = Popen(['pdflatex', '--interaction=nonstopmode',
+                        'SphinxTests.tex'], stdout=PIPE, stderr=PIPE)
+         except OSError:
+-            pass  # most likely pdflatex was not found
++            raise SkipTest  # most likely pdflatex was not found
+         else:
+             stdout, stderr = p.communicate()
+             if p.returncode != 0:
+--- a/tests/test_build_texinfo.py
++++ b/tests/test_build_texinfo.py
+@@ -18,6 +18,7 @@
+ from sphinx.writers.texinfo import TexinfoTranslator
+ 
+ from util import *
++from util import SkipTest
+ from test_build_html import ENV_WARNINGS
+ 
+ 
+@@ -55,7 +56,7 @@
+             p = Popen(['makeinfo', '--no-split', 'SphinxTests.texi'],
+                       stdout=PIPE, stderr=PIPE)
+         except OSError:
+-            pass  # most likely makeinfo was not found
++            raise SkipTest  # most likely makeinfo was not found
+         else:
+             stdout, stderr = p.communicate()
+             retcode = p.returncode

Deleted: packages/sphinx/trunk/debian/patches/skiptest_latex.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/skiptest_latex.diff	2013-06-04 16:03:37 UTC (rev 24643)
+++ packages/sphinx/trunk/debian/patches/skiptest_latex.diff	2013-06-04 16:33:19 UTC (rev 24644)
@@ -1,42 +0,0 @@
-Description: raise SkipTest if LaTeX (or a required LaTeX package) is not found
- If LaTeX (or a required LaTeX package) is not found when running
- test_build_latex, raise SkipTest instead of just printing a message to stderr.
-Author: Jakub Wilk <jwilk at debian.org>
-Bug: https://bitbucket.org/birkenfeld/sphinx/issue/896
-Forwarded: yes
-Last-Update: 2012-03-13
-
---- a/tests/test_build_latex.py
-+++ b/tests/test_build_latex.py
-@@ -18,6 +18,7 @@
- from sphinx.writers.latex import LaTeXTranslator
- 
- from util import *
-+from util import SkipTest
- from test_build_html import ENV_WARNINGS
- 
- 
-@@ -69,17 +70,17 @@
-             return True
- 
-     if kpsetest('article.sty') is None:
--        print >>sys.stderr, \
--              'info: not running latex, it doesn\'t seem to be installed'
--        return
-+        raise SkipTest(
-+              'not running latex, it doesn\'t seem to be installed'
-+        )
-     for filename in ['fancyhdr.sty', 'fancybox.sty', 'titlesec.sty',
-                      'amsmath.sty', 'framed.sty', 'color.sty', 'fancyvrb.sty',
-                      'threeparttable.sty']:
-         if not kpsetest(filename):
--            print >>sys.stderr, \
--                  'info: not running latex, the %s package doesn\'t ' \
-+            raise SkipTest(
-+                  'not running latex, the %s package doesn\'t ' \
-                   'seem to be installed' % filename
--            return
-+            )
- 
-     # now, try to run latex over it
-     cwd = os.getcwd()




More information about the Python-modules-commits mailing list