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


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

Re: building manpages via setup.py

Path csiph.com!goblin3!goblin2!goblin.stu.neva.ru!aioe.org!bofh.it!news.nic.it!robomod
From Ghislain Vaillant <ghisvail@gmail.com>
Newsgroups linux.debian.maint.python
Subject Re: building manpages via setup.py
Date Wed, 02 Aug 2017 12:50:03 +0200
Message-ID <u9ZnZ-it-21@gated-at.bofh.it> (permalink)
References <u9GEH-5cQ-19@gated-at.bofh.it> <u9Hr4-5Jr-23@gated-at.bofh.it> <u9W6J-6Ni-3@gated-at.bofh.it> <u9Wgq-6Qo-9@gated-at.bofh.it> <u9WzL-6Xn-9@gated-at.bofh.it> <u9WzL-6Xn-7@gated-at.bofh.it> <u9WzM-6Xn-25@gated-at.bofh.it> <u9X2O-7mD-23@gated-at.bofh.it> <u9X2O-7mD-21@gated-at.bofh.it> <u9Xmb-7tc-27@gated-at.bofh.it> <u9Xmb-7tc-37@gated-at.bofh.it> <u9XYS-7WK-7@gated-at.bofh.it> <u9Y8x-83f-13@gated-at.bofh.it> <u9YLf-8vK-1@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Aug 2 10:44:17 2017
Old-Return-Path <ghisvail@gmail.com>
X-Amavis-Spam-Status No, score=-6.999 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FOURLA=0.1, FREEMAIL_FROM=0.001, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate: -7
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=nKFc5qMTL0LVfcOWG/uk4TKwuurWE0MummaAbXI9S60=; b=CwLe029y63puQ/+RvTreWWpqap/JBLXUpa7PhJW1EcIJpQkf488PYazxM8/UnT7Kv5 1PlXyERSx/Fbrj1k15j69/swWkZJQ6VVv925JhU9hpW3Z/ZNXIgcTXMK040mrF+H9ZZB Oj49nb3qRTcVLgIb+NNGsyNzcqjqKBRadPg72NYVZ2lCqiYKVSOdonR0oqIPwjg4JgY3 Fx7JZEcN/UUEQcsoLRPDStSxMHSt9HBkWrBiIrOqPPbIR3JW8wpM7vdWLD2AqprfN6lu IivCDwcIVU2fE2VPE3yj/vmAvZuAVD/aWHhXFAWOcjMCRzhpxqAW03TvjzDFEtcK7AsE 3Cqw==
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=nKFc5qMTL0LVfcOWG/uk4TKwuurWE0MummaAbXI9S60=; b=dGu+0pGgakpUz302xvCDJhTPCyhg/C2LZqa0YkAFga/J4/5yhimf5Ti1qvxWl/TG/w adVtT6E1zt3hv9XqZOGLNAOYs4sfC5GoErINBNShUq0w+Llav3l3EYmUw2ZxgPkW47fv bq7tM1G4xaS1oh9PpvTt2IJ/UKZXSlMb7w74ZM+ezyZ2uwJ11DnUHLdd2jQQmitiEh1G wzKIVt+v1344lmARNaCM8VknwDCC1Lei1+zzGveNShUIT8wVBEM4TYLrsR+ie0eBF4XE BNITgxQivQ+1J6qtQkZQmdZbgVJaOcJnHKKvzFsi6AhSU3loxa+Sp9MIfuisGWaxIbg2 pvlg==
X-Gm-Message-State AIVw112np4CBH5pkQGO6eM6lYOn7nYVxWJy1XFAvVBkmBamvTNf0XZCl IfPT+REjLRqkol8/2XI=
X-Received by 10.223.161.84 with SMTP id r20mr18143367wrr.91.1501670642236; Wed, 02 Aug 2017 03:44:02 -0700 (PDT)
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1
MIME-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Language en-GB
Content-Transfer-Encoding 7bit
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15058
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com
Approved robomod@news.nic.it
Lines 67
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 2 Aug 2017 11:44:00 +0100
X-Original-Message-ID <0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com>
X-Original-References <A2A20EC3B8560D408356CAC2FC148E53BB3F8A26@SUN-DAG3.synchrotron-soleil.fr> <20170801153401.6aqaw4syh3pvzchb@sar0.p1otr.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9C43@SUN-DAG3.synchrotron-soleil.fr> <20170802072020.3nwvcsvoly4vycit@sar0.p1otr.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9C98@SUN-DAG3.synchrotron-soleil.fr> <20170802074408.rpzxgjnd2k52upju@sar0.p1otr.com> <9811c4b7-22a8-b913-86b7-70d61b2ad1ef@gmail.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9CDD@SUN-DAG3.synchrotron-soleil.fr> <3ee0f234-2668-afb3-8c4b-569b7de1989b@gmail.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9CF8@SUN-DAG3.synchrotron-soleil.fr> <d296913d-ed6f-4836-9fc1-e5db693b690d@gmail.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9D23@SUN-DAG3.synchrotron-soleil.fr> <5bd26b01-fbcd-631d-13ef-820d1ae218ad@gmail.com> <A2A20EC3B8560D408356CAC2FC148E53BB3F9D7B@SUN-DAG3.synchrotron-soleil.fr>
Xref csiph.com linux.debian.maint.python:9677

Show key headers only | View raw


On 02/08/17 10:45, PICCA Frederic-Emmanuel wrote:
>> First, that's very speculative. Second, that's upstream's problem.
> # If extensions (or modules to document with autodoc) are in another directory,
> # add these directories to sys.path here. If the directory is relative to the
> # documentation root, use os.path.abspath to make it absolute, like shown here.
> #
> # import os
> # import sys
> # sys.path.insert(0, os.path.abspath('.'))
> 
> You need to customize the sys.path in order to find the extensions.

The snippet you quoted is not specific to extension modules but to the 
use of the autodoc feature, which requires the modules to be in the 
PYTHONPATH. The `sys.path.insert` hack is just here so that you don't 
have to specify PYTHONPATH yourself when running the upstream Makefile.

> This path can change depending on the setup.py build options so this is not reliable.

I don't understand how setup.py / build options are affecting the Sphinx 
documentation. You are supposed to either call the generator manually 
via sphinx-build (which the style guide recommends), or using the 
upstream Makefile (which upstream often does).

As far as reliability is concerned, my reference here is upstream. If 
upstream can produce the docs, then I should be able to do it too. And 
they don't have pybuild for that.

>> Why? All you need is *one* occurrence of the extension modules somewhere
>> in the PYTHONPATH in order to generate the docs. Chances are that's how
>> upstream generates them.
> 
> Because by experience I find issue in the build system and the python code when building the doc for multiple
> interpreter (python2/python3 differences...)

Why would you build the docs for each supported Python version, 
considering you'll end up shipping only one instance of the generated 
HTML? I am probably missing something here.

You might as well generate the docs just once with the default Python 2 
or Python 3 interpreter, the same way you would do without extension 
modules, no?

Pardon my insistence, but I really fail to understand what issues you 
are referring to.

>>> Found a total of 643 reverse build-depend(s) for python-all-dev.
>>>
>>> not that small
> 
>> How is the ratio over all the Python packages? I suspect very small.
> 
> Found a total of 1968 reverse build-depend(s) for python-all.
> 
> not that small 32 % ;)

More than I expected, indeed.

And amongst these 643 packages, how many have such large build times 
that the overhead of an additional inplace call would be considered 
prohibitive, I wonder?

Besides, the docs will typically be processed by arch-all builders 
(provided you use -indep targets), so arch-any builds won't even feel 
that overhead, right?

I could be wrong though.

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


Thread

building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-01 16:50 +0200
  Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-01 17:00 +0200
    RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-01 17:50 +0200
  Re: building manpages via setup.py Piotr Ożarowski <piotr@debian.org> - 2017-08-01 17:40 +0200
    RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 09:20 +0200
      Re: building manpages via setup.py Piotr Ożarowski <piotr@debian.org> - 2017-08-02 09:30 +0200
        Re: building manpages via setup.py Piotr Ożarowski <piotr@debian.org> - 2017-08-02 09:50 +0200
          Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-02 09:50 +0200
            Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-02 10:20 +0200
              RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 10:40 +0200
                Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-02 10:40 +0200
                RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 11:20 +0200
                Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-02 11:30 +0200
                RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 12:10 +0200
                Re: building manpages via setup.py Ghislain Vaillant <ghisvail@gmail.com> - 2017-08-02 12:50 +0200
                RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 14:30 +0200
            RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 10:30 +0200
        RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-02 09:50 +0200
        RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-03 12:20 +0200
          RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-03 15:50 +0200
            RE:building manpages via setup.py PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-08-03 16:20 +0200

csiph-web