← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 4179: Use system call "sphinx-build" instead of python module.

 

------------------------------------------------------------
revno: 4179
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Thu 2014-10-02 10:56:07 +0200
message:
  Use system call "sphinx-build" instead of python module.
  
  Fixes documentation generation breakage on a newest
  sphinx 1.2.3.
modified:
  doc/sphinx/yadeSphinx.py


--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'doc/sphinx/yadeSphinx.py'
--- doc/sphinx/yadeSphinx.py	2013-10-15 16:14:46 +0000
+++ doc/sphinx/yadeSphinx.py	2014-10-02 08:56:07 +0000
@@ -212,12 +212,10 @@
 global writer
 writer=None
 
-for w in ['html','latex','epub']:
-	writer=w
+for writer in ['html','latex','epub']:
 	genWrapperRst()
-	# HACK: must rewrite sys.argv, since reference generator in conf.py determines if we output latex/html by inspecting it
-	sys.argv=['sphinx-build','-a','-E','-b','%s'%writer,'-d',outDir+'/doctrees','.',outDir+'/%s'%writer]
-	sphinx.main(sys.argv)
+        commLine = "sphinx-build -a -E -b %s -d %s . %s"%(writer,outDir+'/doctrees', (outDir+'/%s'%writer))
+        os.system(commLine)
 	if writer=='html':
 		makeBaseClassesClickable((outDir+'/html/yade.wrapper.html'),writer)
 	elif writer=='latex':
@@ -225,7 +223,7 @@
 	if (os.path.exists('/usr/share/javascript/jquery/jquery.js')): #Check, whether jquery.js installed in system
 		os.system('rm '+ outDir+'/html/_static/jquery.js')
 		os.system('ln -s /usr/share/javascript/jquery/jquery.js '+ outDir+'/html/_static/jquery.js')
-    
+
 	# HACK!!!!==========================================================================
 	# New sphinx-python versions (hopefully) are producing empty "verbatim"-environments.
 	# That is why xelatex crashes.