Commits

Mike Bayer  committed af878e0

- fix to PDF generation failing totally, latex tools here
are broken but will see if RTD produces a pdf

  • Participants
  • Parent commits b67442c
  • Branches rel_0_7

Comments (0)

Files changed (2)

File doc/build/builder/dialect_info.py

     def _append_dbapi_bullet(self, dialect_name, dbapi_name, name, idname):
         env = self.state.document.settings.env
         dialect_directive = self._dialects[dialect_name]
-
+        try:
+            relative_uri = env.app.builder.get_relative_uri(dialect_directive.docname, self.docname) 
+        except:
+            relative_uri = ""
         list_node = nodes.list_item('',
                 nodes.paragraph('', '',
                     nodes.reference('', '',
                                 nodes.Text(name, name),
                                 refdocname=self.docname,
-                                refuri=env.app.builder.get_relative_uri(
-                                        dialect_directive.docname, self.docname) +
-                                            "#" + idname
+                                refuri= relative_uri + "#" + idname
                             ),
                     #nodes.Text(" ", " "),
                     #nodes.reference('', '',

File doc/build/builder/mako.py

             context['layout'] = "rtd_layout.mako"
             context['base'] = "rtd_base.mako"
 
-            # pdf gen is just broken on RTD
-            #context['pdf_url'] = "%spdf/%s/%s/%s.pdf" % (
-            #        context['MEDIA_URL'],
-            #        context['slug'],
-            #        context['current_version'],
-            #        context['slug']
-            #)
+            context['pdf_url'] = "%spdf/%s/%s/%s.pdf" % (
+                    context['MEDIA_URL'],
+                    context['slug'],
+                    context['current_version'],
+                    context['slug']
+            )
         # local docs layout
         else:
             context['rtd'] = False