[AstroPy] docs building issue
Russell Hewett
rhewett at mit.edu
Wed Nov 20 20:46:14 EST 2013
OK, I take that back. Changing '1.2b2' to '1.2' worked. I had forgotten
that that particular conf file was burried in the package and I was not in
develop mode, so live updates were meaningless. Had to reinstall for the
change to take effect.
That said, following Erik's advice, I did check, and the conf is indeed
getting sphinx 1.2b2. (And we can thus conclude that conda uninstall works
correctly.)
On Wed, Nov 20, 2013 at 8:35 PM, Erik Tollerud <erik.tollerud at gmail.com>wrote:
> 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
> _______________________________________________
> AstroPy mailing list
> AstroPy at scipy.org
> http://mail.scipy.org/mailman/listinfo/astropy
>
--
Russell J. Hewett
Postdoctoral Associate
Imaging and Computing Group
Department of Mathematics
Massachusetts Institute of Technology
www.russellhewett.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/astropy/attachments/20131120/84f61ffc/attachment.html>
More information about the AstroPy
mailing list