Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!weretis.net!feeder4.news.weretis.net!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod From: Nikolaus Rath Newsgroups: linux.debian.maint.python Subject: Re: Upstream build system, Sphinx autodoc, Python import path Date: Fri, 30 Sep 2016 05:00:01 +0200 Message-ID: References: X-Original-To: debian-python@lists.debian.org X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Sep 30 02:53:29 2016 Old-Return-Path: X-Amavis-Spam-Status: No, score=-1.58 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DIGITS_LETTERS=1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FOURLA=0.1, MURPHY_DRUGS_REL8=0.02, RCVD_IN_DNSWL_LOW=-0.7] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -7 X-Greylist: delayed 449 seconds by postgrey-1.35 at bendel; Fri, 30 Sep 2016 02:53:16 UTC Dkim-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=B2D6+pS7YKV1UkN rBjOworxon5o=; b=t8ZhpLKzj5EmRXkyWnFrow40ARNuEOKDQplvGtnmW1hUNN4 2YLSQDSFDTku7Ik0yd/kOWEV69rfCn+GHYZbJToPy87QUH/ZitJzLFpu6RFoEqgh t/jkQi1EdRufGiKXpQ72XhTzSW8vpjn1u8VRMM5TcwogjFC3w+kqAfkYMlLo= X-Sasl-Enc: NXAp+Jx1dFv/sIOrI3g+Kx4ia4RaDU99nrW9DHi9kLdQ 1475203543 Mail-Copies-To: never Mail-Followup-To: debian-python@lists.debian.org User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/24.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Mailing-List: archive/latest/14258 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/87k2duxfzd.fsf@vostro.rath.org Approved: robomod@news.nic.it Lines: 66 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Thu, 29 Sep 2016 19:45:42 -0700 X-Original-Message-ID: <87k2duxfzd.fsf@vostro.rath.org> X-Original-References: <85h991lodg.fsf@benfinney.id.au> <8f17303d-4521-05e5-5795-7b1aa4bd7d6d@debian.org> Xref: csiph.com linux.debian.maint.python:8916 On Sep 29 2016, Thomas Goirand wrote: > On 09/27/2016 10:48 AM, Ben Finney wrote: >> https://wiki.debian.org/Python/LibraryStyleGuide#Sphinx_documentation > > I just had a quick look to that page, not only it advises to override > the wrong dh sequence, but also it gives stupid advices for intersphinx: > > "sphinx-build might try to access the Internet to fetch intersphinx > inventory files; http_proxy set to 127.0.0.1:9 will prevent that." > > Instead of attempting circumvention of the effect of using intersphinx, > it's best to simply *DISABLE* intersphinx in the conf.py of the > documentation. Setting-up http_proxy / https_proxy to do that, really, > is the wrong way. Lots of my packages contain intersphinx disabling > patches. Even better than disabling intersphinx is to ship the required data in the package, e.g: $ cat debian/patches/use-local-intersphinx-inventory.patch=20 >From 48e6c33f77106b9368e7db430d296ba6c31e47a6 Mon Sep 17 00:00:00 2001 From: Nikolaus Rath Date: Thu, 8 Oct 2015 12:24:34 -0700 Subject: Use local intersphinx inventory Forwarded: not-needed Last-Update: 2011-07-06 Instead of downloading the Python intersphinx directory at build time, use the cached copy shipped in debian/. Patch-Name: use-local-intersphinx-inventory.patch --- rst/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/rst/conf.py b/rst/conf.py index 2290d..f6425 100644 --- a/rst/conf.py +++ b/rst/conf.py @@ -27,7 +27,8 @@ extensions =3D ['sphinx.ext.autodoc', 'sphinx.ext.intersp= hinx', 'sphinx_cython' ] =20 # Link to Python standard library -intersphinx_mapping =3D {'python': ('http://docs.python.org/3/', None) } +intersphinx_mapping =3D {'python': ('http://docs.python.org/3/', + '../debian/python.inv')} =20 # Add any paths that contain templates here, relative to this directory. templates_path =3D ['_templates'] $ grep intersphinx -C 1 debian/rules=20=20 update_intersphinx: wget http://docs.python.org/3/objects.inv -O debian/python.inv Best, -Nikolaus --=20 GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F =C2=BBTime flies like an arrow, fruit flies like a Banana.=C2= =AB