[Python-modules-commits] r33517 - in packages/sphinx/trunk/debian (3 files)

mitya57 at users.alioth.debian.org mitya57 at users.alioth.debian.org
Tue Jul 28 18:46:02 UTC 2015


    Date: Tuesday, July 28, 2015 @ 18:46:01
  Author: mitya57
Revision: 33517

Backport upstream patch to not insert babel-specific code to generated
LaTeX files when babel is not in use (addto_only_babel.diff).

Added:
  packages/sphinx/trunk/debian/patches/addto_only_babel.diff
Modified:
  packages/sphinx/trunk/debian/changelog
  packages/sphinx/trunk/debian/patches/series

Modified: packages/sphinx/trunk/debian/changelog
===================================================================
--- packages/sphinx/trunk/debian/changelog	2015-07-28 18:20:54 UTC (rev 33516)
+++ packages/sphinx/trunk/debian/changelog	2015-07-28 18:46:01 UTC (rev 33517)
@@ -3,6 +3,8 @@
   * Update debian/TODO with the actual information.
   * Backport upstream patch to disable warning about renamed default theme
     (no_theme_rename_warning.diff).
+  * Backport upstream patch to not insert babel-specific code to generated
+    LaTeX files when babel is not in use (addto_only_babel.diff).
   * Add support for $SOURCE_DATE_EPOCH environment variable, to make
     the documentation builds reproducible (source_date_epoch.diff).
   * dh_sphinxdoc: Symlink css3-mediaqueries.js, thanks to Jakub Wilk

Added: packages/sphinx/trunk/debian/patches/addto_only_babel.diff
===================================================================
--- packages/sphinx/trunk/debian/patches/addto_only_babel.diff	                        (rev 0)
+++ packages/sphinx/trunk/debian/patches/addto_only_babel.diff	2015-07-28 18:46:01 UTC (rev 33517)
@@ -0,0 +1,21 @@
+Description: use babel features only if the babel latex element is nonempty.
+Origin: upstream, https://github.com/sphinx-doc/sphinx/commit/e4b42fe15fbba488
+Last-Update: 2015-07-28
+
+--- a/sphinx/writers/latex.py
++++ b/sphinx/writers/latex.py
+@@ -342,8 +342,12 @@
+             else:
+                 language = 'english'
+ 
+-            babel_prefix = '\\addto\\captions%s{' % language
+-            babel_suffix = '}'
++            if self.elements['babel']:
++                babel_prefix = '\\addto\\captions%s{' % language
++                babel_suffix = '}'
++            else:
++                babel_prefix = ''
++                babel_suffix = ''
+ 
+         figure = self.builder.config.numfig_format['figure'].split('%s', 1)
+         if len(figure) == 1:

Modified: packages/sphinx/trunk/debian/patches/series
===================================================================
--- packages/sphinx/trunk/debian/patches/series	2015-07-28 18:20:54 UTC (rev 33516)
+++ packages/sphinx/trunk/debian/patches/series	2015-07-28 18:46:01 UTC (rev 33517)
@@ -6,3 +6,4 @@
 py35compat.diff
 no_theme_rename_warning.diff
 source_date_epoch.diff
+addto_only_babel.diff




More information about the Python-modules-commits mailing list