dev-python/flask-cors/flask-cors-9999.ebuild: Use local intersphinx
authorW. Trevor King <wking@tremily.us>
Tue, 2 Sep 2014 22:54:51 +0000 (15:54 -0700)
committerW. Trevor King <wking@tremily.us>
Tue, 2 Sep 2014 22:54:51 +0000 (15:54 -0700)
commitf3893ec93d2d62a2d2b3a77ad30b195414035241
treef0d509c4ea85ea48dccc40a976a47966fc908f70
parent1fa8b8fd1097460603f3bc025d94bc623c18531b
dev-python/flask-cors/flask-cors-9999.ebuild: Use local intersphinx

Gentoo's python-docs recently learned how to install objects.inv (with
the 2.7.6, 3.3.5, and 3.4.0 ebuilds, but without a revbump [1]).
Avoid the troublesome web access [2,3]:

  loading intersphinx inventory from http://docs.python.org/objects.inv...

Unfortunately, the approach to locating the local objects.inv is a bit
awkward.  Ideally there would be some sort of pkg-config approach to
listing a package's HTML doc directory :p, but until then the best I
can do is shell out to ls with an EROOT-based glob.  Using ROOT in
ebuild functions is illegal though [4] (and by extension, using it via
EROOT may be illegal as well).  Even if it was legal, you're going to
run into trouble if the python-docs dependency was installed with a
different ROOT, which is why I die if PYTHON_DOC is empty.

[1]: https://bugs.gentoo.org/show_bug.cgi?id=521768
     Summary: dev-python/python-docs-3.4.0 doesn't install objects.inv
       for intersphinx
[2]: https://bugs.gentoo.org/show_bug.cgi?id=522064
     Summary: should explicitly disallow network access from existing
       ebuild functions
[3]: https://github.com/gentoo/devmanual.gentoo.org/pull/21
     Summary: ebuild-writing/functions: Don't allow network access
[4]: http://devmanual.gentoo.org/ebuild-writing/common-mistakes/#invalid-use-of-root
dev-python/flask-cors/flask-cors-9999.ebuild