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 Newsgroups: linux.debian.maint.python Subject: RE:building manpages via setup.py Date: Wed, 02 Aug 2017 14:30:02 +0200 Message-ID: References: X-Original-To: Ghislain Vaillant , "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: 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: archive/latest/15059 List-ID: List-URL: 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: X-Original-References: <20170801153401.6aqaw4syh3pvzchb@sar0.p1otr.com> <20170802072020.3nwvcsvoly4vycit@sar0.p1otr.com> <20170802074408.rpzxgjnd2k52upju@sar0.p1otr.com> <9811c4b7-22a8-b913-86b7-70d61b2ad1ef@gmail.com> <3ee0f234-2668-afb3-8c4b-569b7de1989b@gmail.com> <5bd26b01-fbcd-631d-13ef-820d1ae218ad@gmail.com> ,<0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com> <0c4c750f-0586-4b18-9e3c-5189ceefd887@gmail.com> Xref: csiph.com linux.debian.maint.python:9678 > 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, wh= cih is avhieved via the right PYTHONPATH. So, during the build phase you can gives options on the python setup.py co= mmand 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 th= is 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 setu= p.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 generat= e packages for python modules from pip in order to reduce the effort of pacakging, So there should be only one way to build th= e 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 setu= p.py. It workd with --inplace but it does not work for real after build ans insta= llation. Cheers Fred I could be wrong though.