old_contents: import sys
  
  import subprocess, sys
  
  def run_doxygen(folder):
      """Run the doxygen make command in the designated folder"""
  
      try:
          retcode = subprocess.call("cd %s; make" % folder, shell=True)
          if retcode < 0:
              sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
      except OSError as e:
          sys.stderr.write("doxygen execution failed: %s" % e)
  
  
  def generate_doxygen_xml(app):
      """Run the doxygen make commands if we're on the ReadTheDocs server"""
  
      read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
  
      if read_the_docs_build:
  
          run_doxygen(".")
  
  
  def setup(app):
  
      # Add hook for building doxygen xml when needed
      app.connect("builder-inited", generate_doxygen_xml)
new_contents: import subprocess, sys, os
  
  def run_doxygen(folder):
      """Run the doxygen make command in the designated folder"""
  
      try:
          retcode = subprocess.call("cd %s; make" % folder, shell=True)
          if retcode < 0:
              sys.stderr.write("doxygen terminated by signal %s" % (-retcode))
      except OSError as e:
          sys.stderr.write("doxygen execution failed: %s" % e)
  
  
  def generate_doxygen_xml(app):
      """Run the doxygen make commands if we're on the ReadTheDocs server"""
  
      read_the_docs_build = os.environ.get('READTHEDOCS', None) == 'True'
  
      if read_the_docs_build:
  
          run_doxygen(".")
  
  
  def setup(app):
  
      # Add hook for building doxygen xml when needed
      app.connect("builder-inited", generate_doxygen_xml)
subject: test read the docs config