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


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

Re: sphinx-build vs. Python 3

From Dmitry Shachnev <mitya57@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: sphinx-build vs. Python 3
Date 2018-08-21 15:10 +0200
Message-ID <wpeA2-2YE-1@gated-at.bofh.it> (permalink)
References <woNq9-3Oq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Ondřej!

On Mon, Aug 20, 2018 at 09:50:25AM +0200, Ondrej Novy wrote:
> Hi,
>
> I have question about sphinx-build and our effort to move to Python 3.
>
> sphinx-build is currently Python 2 or Python 3 according to python-sphinx /
> python3-sphinx package installed (with python3 as default if both are
> installed by alternative priority).
>
> According to:
> https://wiki.debian.org/Python/LibraryStyleGuide#Sphinx_documentation we
> should use "python3 -m sphinx" if we want to build docs using Python 3,
> because if you run sphinx-build, you can't be sure which version of Sphinx
> is run and if you need some Sphinx extension, which we typically installs
> only Python 2 or Python 3 version of it.

That wiki page was written before I changed Sphinx scripts to use Python 3
by default. That happened only recently, the relevant upload reached
unstable on July 5th 2018.

If you depend on python3-sphinx (>= 1.7.5-4~) then most likely the scripts
will be using Python 3. The opposite will happen only if the user manually
updated the alternative, and this won’t be the case on a sane build
environment.

> And my question is:
> * should we use "python3 -m sphinx" instead of "sphinx-build" everywhere
> where python3-sphinx is in B-D (mass-commit?)

This won’t hurt, but as I said it won’t make any difference on the current
unstable. It will make difference only when building against an older version
of sphinx (e.g. backports) *and* with installed python-sphinx.

> * should we change sphinx-build to be Python3 only? (and broke current
> packages build with Python2 Sphinx)

I would like to do this in the future, but currently there will be too
many broken packages:

https://lintian.debian.org/tags/build-depends-on-python-sphinx-only.html
lists 386 packages.

--
Dmitry Shachnev

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


Thread

sphinx-build vs. Python 3 Ondrej Novy <novy@ondrej.org> - 2018-08-20 10:10 +0200
  Re: sphinx-build vs. Python 3 Thomas Goirand <zigo@debian.org> - 2018-08-20 12:40 +0200
    Re: sphinx-build vs. Python 3 Ondrej Novy <novy@ondrej.org> - 2018-08-21 10:50 +0200
      Re: sphinx-build vs. Python 3 Thomas Goirand <zigo@debian.org> - 2018-08-21 12:40 +0200
        Re: sphinx-build vs. Python 3 Ondrej Novy <novy@ondrej.org> - 2018-08-21 13:00 +0200
  Re: sphinx-build vs. Python 3 Dmitry Shachnev <mitya57@debian.org> - 2018-08-21 15:10 +0200
    Re: sphinx-build vs. Python 3 Mattia Rizzolo <mattia@debian.org> - 2018-08-21 22:30 +0200

csiph-web