[AstroPy] docs building issue

Erik Tollerud erik.tollerud at gmail.com
Wed Nov 20 20:35:11 EST 2013


To clarify why this is necessary: it turns out that sphinx used
something in the graphviz API that was either private or deprecated,
and it changed between graphviz 0.28 and 0.30.  Sphinx fixed this in
version 1.2 beta something or other, but that means if you have Sphinx
1.1.3 (the current release version) and a graphviz newer than 0.28,
any graphviz graphs (including the class inheritance diagrams) cause
sphinx to fail.

The really odd thing is that it says you *have* Sphinx v1.2b2.  Is
there any chance you have two different sphinx versions installed on
top of each other?  It's *possible* that would make it think it's
version 1.2, when the actual code getting called is 1.1.3 ... one way
to check this might be to edit astropy/astropy/sphinx/conf.py to add a
``print sphinx.__version__`` directly under the `need_sphinx`
definitions.  Then you'd know for sure which version it was actually
using there.

On Wed, Nov 20, 2013 at 7:24 PM, Miguel de Val-Borro
<miguel.deval at gmail.com> wrote:
> On Wed, Nov 20, 2013 at 06:20:19PM -0500, Russell Hewett wrote:
>> def get_graphviz_version():
>>     try:
>>         output = subprocess.check_output(
>>             ['dot', '-V'], stdin=subprocess.PIPE,
>>             stderr=subprocess.STDOUT,
>>             shell=True)
>>     except subprocess.CalledProcessError:
>>         return '0'
>>     tokens = output.split()
>>     for token in tokens:
>>         if re.match(b'[0-9.]*', token):
>>             return token.decode('ascii')
>>     return '0'
>>
>> graphviz_found = LooseVersion(get_graphviz_version())
>> graphviz_broken = LooseVersion('0.30')
>>
>> if graphviz_found >= graphviz_broken:
>>     needs_sphinx = '1.2b2'
>> else:
>>     needs_sphinx = '1.1'
>
> It looks like the version comparison in Sphinx is done with the
> major.minor numbers in the version string. Could you try to replace in
> that file:
>
> needs_sphinx = '1.2b2'
> by
> needs_sphinx = '1.2'
>
> I'm not sure that it will help but maybe the comparison is failing
> because of that.
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy



-- 
Erik



More information about the AstroPy mailing list