Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.maint.python > #8916

Re: Upstream build system, Sphinx autodoc, Python import path

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 <Nikolaus@rath.org>
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 <smWdj-4me-5@gated-at.bofh.it> (permalink)
References <slWfn-7h7-15@gated-at.bofh.it> <smRdE-15L-19@gated-at.bofh.it>
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 <Nikolaus@rath.org>
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 <debian-python@lists.debian.org> archive/latest/14258
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
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

Show key headers only | View raw


On Sep 29 2016, Thomas Goirand <zigo@debian.org> 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 
>From 48e6c33f77106b9368e7db430d296ba6c31e47a6 Mon Sep 17 00:00:00 2001
From: Nikolaus Rath <Nikolaus@rath.org>
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 = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx',
               'sphinx_cython' ]
 
 # Link to Python standard library
-intersphinx_mapping = {'python': ('http://docs.python.org/3/', None) }
+intersphinx_mapping = {'python': ('http://docs.python.org/3/',
+                                  '../debian/python.inv')}
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']

$ grep intersphinx -C 1 debian/rules  

update_intersphinx:
	wget http://docs.python.org/3/objects.inv -O debian/python.inv



Best,
-Nikolaus

-- 
GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F
Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F

             »Time flies like an arrow, fruit flies like a Banana.«

Back to linux.debian.maint.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Upstream build system, Sphinx autodoc, Python import path Ben Finney <ben+debian@benfinney.id.au> - 2016-09-27 10:50 +0200
  Re: Upstream build system, Sphinx autodoc, Python import path Thomas Goirand <zigo@debian.org> - 2016-09-29 23:30 +0200
    Re: Upstream build system, Sphinx autodoc, Python import path Dmitry Shachnev <mitya57@debian.org> - 2016-09-30 08:50 +0200
  Re: Upstream build system, Sphinx autodoc, Python import path Thomas Goirand <zigo@debian.org> - 2016-09-29 23:40 +0200
    Re: Upstream build system, Sphinx autodoc, Python import path Barry Warsaw <barry@debian.org> - 2016-09-30 00:00 +0200
    Re: Upstream build system, Sphinx autodoc, Python import path Nikolaus Rath <Nikolaus@rath.org> - 2016-09-30 05:00 +0200
      Re: Upstream build system, Sphinx autodoc, Python import path Florent Rougon <f.rougon@free.fr> - 2016-09-30 08:20 +0200
        Re: Upstream build system, Sphinx autodoc, Python import path Thomas Goirand <zigo@debian.org> - 2016-09-30 12:20 +0200
        Re: Upstream build system, Sphinx autodoc, Python import path Nikolaus Rath <Nikolaus@rath.org> - 2016-09-30 23:20 +0200

csiph-web