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


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

RE:building manpages via setup.py

Path csiph.com!feeder.erje.net!2.eu.feeder.erje.net!feed.usenet.farm!feeder3.usenet.farm!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod
From PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr>
Newsgroups linux.debian.maint.python
Subject RE:building manpages via setup.py
Date Wed, 02 Aug 2017 14:30:02 +0200
Message-ID <ua0WK-1ph-7@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> <ua0WK-1ph-9@gated-at.bofh.it> <u9ZnZ-it-21@gated-at.bofh.it>
X-Original-To Ghislain Vaillant <ghisvail@gmail.com>, "debian-python@lists.debian.org" <debian-python@lists.debian.org>
X-Mailbox-Line From debian-python-request@lists.debian.org Wed Aug 2 12:21:10 2017
Old-Return-Path <frederic-emmanuel.picca@synchrotron-soleil.fr>
X-Amavis-Spam-Status No, score=1 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, MONOTONE_WORDS_2_15=1, RCVD_IN_DNSWL_NONE=-0.0001, THREADTOPIC=2] autolearn=no autolearn_force=no
X-Policyd-Weight using cached result; rate: -6.1
Dkim-Filter OpenDKIM Filter v2.10.3 poussette.synchrotron-soleil.fr AED2F600B2
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=synchrotron-soleil.fr; s=email; t=1501675458; bh=2mcYGA1N0LiKaxoMT91GAE/GAYGk2z/0ZOdiqojzHz0=; h=From:To:Subject:Date:References:In-Reply-To:From; b=Vh6icR6XFxOnktyswqmSBJlK3/9TvQstmREW46/qJb5lumr+mKKkNJDO7hkxoepP2 /aK3JH0sBnODrsosmgv2ScUVmwkEbR4yVkJ658RyYJp9Pk4Ib88Q2Fl320qUqILg2N q76VYjL3n82vO2bWnnIsVH9BpqETQxrqjjk5OKWc=
Dkim-Filter OpenDKIM Filter v2.10.3 poussette.synchrotron-soleil.fr B61CC600AD
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=synchrotron-soleil.fr; s=email; t=1501675457; bh=2mcYGA1N0LiKaxoMT91GAE/GAYGk2z/0ZOdiqojzHz0=; h=From:To:Subject:Date:References:In-Reply-To:From; b=ewAgb/4kBGHktykOXpItowKKMZGBkE8Yy31twFoczqXN5FWwTzBkDAlhnHkkLMF8p MwGuWxRMwejKAgRe6AEWzlwmMicx4c9hikU/EpHi0/6B3yd3l6AwFevP1oZ2Oj9y0k Mdzhod0XIOGc4MqCs/kwd+Vu8nhs9PJvQb9LSIo0=
Thread-Topic building manpages via setup.py
Thread-Index AdMKnYeNbtHGA2ChRMa/5+FgMHXlSAALU42AACRWRyD//+WzAIAAIkd1///kXwCAAAEXAIAAJXaV///iEoCAACJ29f//4toAAAS5p7UAAwPEAAABSiC/AAR9KgAAAnV++A==
Accept-Language fr-FR, en-US
Content-Language fr-FR
X-Originating-IP [195.221.0.171]
Content-Type text/plain; charset="us-ascii"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-Mailing-List <debian-python@lists.debian.org> archive/latest/15059
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/A2A20EC3B8560D408356CAC2FC148E53BB3F9E00@SUN-DAG3.synchrotron-soleil.fr
Approved robomod@news.nic.it
Lines 94
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Wed, 2 Aug 2017 12:04:16 +0000
X-Original-Message-ID <A2A20EC3B8560D408356CAC2FC148E53BB3F9E00@SUN-DAG3.synchrotron-soleil.fr>
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>,<0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com> <0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com>
Xref csiph.com linux.debian.maint.python:9678

Show key headers only | View raw


> 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.

I just says that this snipset is in the conf.py and I yes we need this for autodoc.

> 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).

autodoc introspect the module so you need a working modules from python, whcih is avhieved via the right PYTHONPATH.
So, during the build phase you can gives  options on the python setup.py command line.
This has an effect on the location where the module  and the extensions are built.

build seems to be the default location BUT when we use pybuild it is under .pybuild

So the default PYTHONPATH does not work.

there is no way for sphinx to know where the module and its extensions are excepty by providing the right PYTHONPATH.

Except if sphinx would provide a build_sphinx command whcih take care of this problem and take into account the parameters of the setup.py.

> 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.

Yes but sometime there si some hack done by the upstream in conf.py or setup.py
in order to look for the module at the standards path (under build/) which doesn not work with pybuild.

> 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.

I use this as a sort of unit test. And it is interesting because I catche a bunch of python2/python3 issues like this.
Then I can find issues between sphinx running on python2 or python3.

This is at least a good way to check thaht all the modules can be laoded.

autodoc is interesting for this.

> 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.

incompatibilities vetween python2 and python 3 code.
peoples trie to  write code python2 and python3 compatible but this is not thaht easy...

> 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?

I do not know, I just think that we should be able to automatically generate packages for python modules from pip in order to
reduce the effort of pacakging, So there should be only one way to build the documentation , manpages.
Escpecillay wheren there is extensions.


> 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?

Yes except that this is ot because --inplace work that the result of python setup.py build are identical.

it is possible to  forget a module referenced by another module in the setup.py.
It workd with --inplace but it does not work for real after build ans installation.

Cheers

Fred


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