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


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

Re: providing sphinx3-* binaries

From Thomas Goirand <zigo@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: providing sphinx3-* binaries
Date 2017-09-29 13:00 +0200
Message-ID <uv1bs-54Y-3@gated-at.bofh.it> (permalink)
References <uu6wx-2em-17@gated-at.bofh.it>
Organization Debian

Show all headers | View raw


Hi Antoine,

Thanks for your post.

On 09/27/2017 12:29 AM, Antoine Beaupré 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 be
>     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é wrote:
> A simple --with=sphinxdoc 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)

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


Thread

providing sphinx3-* binaries Antoine Beaupré <anarcat@debian.org> - 2017-09-27 00:30 +0200
  Re: providing sphinx3-* binaries Dmitry Shachnev <mitya57@debian.org> - 2017-09-28 00:10 +0200
    Re: providing sphinx3-* binaries Simon McVittie <smcv@debian.org> - 2017-09-28 09:40 +0200
    Re: providing sphinx3-* binaries Antoine Beaupré <anarcat@debian.org> - 2017-09-28 14:30 +0200
      Re: providing sphinx3-* binaries Dmitry Shachnev <mitya57@debian.org> - 2017-09-28 19:00 +0200
        Re: providing sphinx3-* binaries Antoine Beaupré <anarcat@debian.org> - 2017-09-28 19:20 +0200
  Re: providing sphinx3-* binaries Thomas Goirand <zigo@debian.org> - 2017-09-29 13:00 +0200
    RE:providing sphinx3-* binaries PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-09-29 13:30 +0200
      Re: providing sphinx3-* binaries Ghislain Vaillant <ghisvail@gmail.com> - 2017-09-29 14:00 +0200
        RE:providing sphinx3-* binaries PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2017-09-29 14:20 +0200
      Re: providing sphinx3-* binaries Thomas Goirand <zigo@debian.org> - 2017-10-03 23:50 +0200
        Re: providing sphinx3-* binaries Ghislain Vaillant <ghisvail@gmail.com> - 2017-10-04 04:50 +0200
          Re: providing sphinx3-* binaries Thomas Goirand <zigo@debian.org> - 2017-10-04 11:50 +0200

csiph-web