瀏覽代碼

fix build errors with `make latexpdf`

This commit provides two small fixes.

Gif images are not supported by latexpdf. There are a handful of options
to resolve that issue, but the already-available imgconverter extension
takes care of converting them to supported image formats.

The pdf build was failing due to the deprecated Sphinx `app.warn` used
in the sphinx_tabs extension. The `app.log` deprecation was already
handled in this function, and now `warn` is as well.
AJ Heller 5 年之前
父節點
當前提交
0d0f9961f4
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 2 1
      conf.py
  2. 3 1
      extensions/sphinx_tabs/tabs.py

+ 2 - 1
conf.py

@@ -11,7 +11,8 @@ needs_sphinx = '1.3'
 
 # Sphinx extension module names and templates location
 sys.path.append(os.path.abspath('extensions'))
-extensions = ['gdscript', 'sphinx_tabs.tabs', 'sphinx.ext.imgmath']
+extensions = ['gdscript', 'sphinx_tabs.tabs', 'sphinx.ext.imgmath', 'sphinx.ext.imgconverter']
+
 templates_path = ['_templates']
 
 # You can specify multiple suffix as a list of string: ['.rst', '.md']

+ 3 - 1
extensions/sphinx_tabs/tabs.py

@@ -291,14 +291,16 @@ def copy_assets(app, exception):
     """ Copy asset files to the output """
     if 'getLogger' in dir(logging):
         log = logging.getLogger(__name__).info  # pylint: disable=no-member
+        warn = logging.getLogger(__name__).warning  # pylint: disable=no-member
     else:
         log = app.info
+        warn = app.warn
     builders = get_compatible_builders(app)
     if exception:
         return
     if app.builder.name not in builders:
         if not app.config['sphinx_tabs_nowarn']:
-            app.warn(
+            warn(
                 'Not copying tabs assets! Not compatible with %s builder' %
                 app.builder.name)
         return