Path: csiph.com!feeder.erje.net!2.us.feeder.erje.net!goblin1!goblin2!goblin.stu.neva.ru!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod From: Thomas Goirand Newsgroups: linux.debian.maint.python Subject: Re: providing sphinx3-* binaries Date: Fri, 29 Sep 2017 13:00:02 +0200 Message-ID: References: X-Mailbox-Line: From debian-python-request@lists.debian.org Fri Sep 29 10:58:24 2017 Old-Return-Path: X-Amavis-Spam-Status: No, score=-5.76 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, LDO_WHITELIST=-5, RCVD_IN_DNSWL_NONE=-0.0001, SARE_LWSHORTT=1.24] autolearn=no autolearn_force=no X-Policyd-Weight: using cached result; rate: -5 Organization: Debian User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable X-Mailing-List: archive/latest/15255 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/ff878371-16bb-c0ad-0dcc-32208f64a7c5@debian.org Approved: robomod@news.nic.it Lines: 48 Sender: robomod@news.nic.it X-Original-Date: Fri, 29 Sep 2017 12:58:04 +0200 X-Original-Message-ID: X-Original-References: <877ewlqeku.fsf@curie.anarc.at> Xref: csiph.com linux.debian.maint.python:9873 Hi Antoine, Thanks for your post. On 09/27/2017 12:29 AM, Antoine Beaupr=C3=A9 wrote: > 6. there are currently packages depending on *both* python-sphinx and > python3-sphinx. for me, that makes no sense at all: there is a > single set of documentation files built in a package, and it must b= e > on either one of those packages, but not both. if the software > supports building with python3, then it should depend on > python3-sphinx, if not, it should depend on python-sphinx. by > switching to sphinx{,3} binary packages, this would make that > distinction clearer as well. It does make sense if the package is a sphinx extension, and it has tests that you may want to run in both Python 2 and 3 cases. I do have a few of these cases (even though I'm planning on switching to Python3 support only in the short term). On 09/28/2017 02:27 PM, Antoine Beaupr=C3=A9 wrote: > A simple --with=3Dsphinxdoc should be sufficient to build sphinx docs. > We shouldn't expect upstream to do that step in setup.py, as it is > rarely hooked into the main build. I don't agree with this. I generally prefer to write things this way: override_dh_sphinxdoc: ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS))) sphinx-build -b html doc/source \ $(CURDIR)/debian/python-foo-doc/usr/share/doc/python-foo-doc/html dh_sphinxdoc endif (sorry for the indentation above, lines are too short in emails) This way, there's no need to pickup/copy the docs in doc/build, it ends up directly in the package, ready for dh_sphinxdoc. If I need to add some variables (for example to fix reproducibility), I can easily do it. I will be switching to the "python3 -m sphinx" style soon, though that's unrelated. Over the years, I found using this method a way better than using "python{3,} setup.py build_sphinx". I'd suggest you try my way too. Cheers, Thomas Goirand (zigo)