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


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

Re: pybuild sphinxdoc and extensions

Path csiph.com!eternal-september.org!feeder.eternal-september.org!weretis.net!feeder1.news.weretis.net!newsfeed.CARNet.hr!news.spin.it!bofh.it!news.nic.it!robomod
From Christoph Groth <christoph@grothesque.org>
Newsgroups linux.debian.maint.python
Subject Re: pybuild sphinxdoc and extensions
Date Thu, 22 Oct 2015 16:20:01 +0200
Message-ID <qmoSJ-4U2-3@gated-at.bofh.it> (permalink)
References <n3Z3k-4ZZ-11@gated-at.bofh.it>
X-Original-To piotr@debian.org
X-Mailbox-Line From debian-python-request@lists.debian.org Thu Oct 22 14:11:35 2015
Old-Return-Path <christoph@grothesque.org>
X-Amavis-Spam-Status No, score=-6.134 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FAKE_REPLY_C=1.486, FOURLA=0.1, PGPSIGNATURE=-5, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] autolearn=ham autolearn_force=no
X-Policyd-Weight NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .grothesque. - helo: .smtp.webfaction. - helo-domain: .webfaction.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -7
User-Agent Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
MIME-Version 1.0
Content-Type multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature"
X-Mailing-List <debian-python@lists.debian.org> archive/latest/13071
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/87611zxabm.fsf@grothesque.org
Approved robomod@news.nic.it
Lines 100
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Cc debian-python@lists.debian.org
X-Original-Date Thu, 22 Oct 2015 16:11:09 +0200
X-Original-Message-ID <87611zxabm.fsf@grothesque.org>
X-Original-References <20140406172817.GE6458@p1otr.com>
Xref csiph.com linux.debian.maint.python:7759

Show key headers only | View raw


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

Cześć Piotr,

I found this thread while trying to update the Debian packaging 
for a Python library that I maintain.  The library has Sphinx 
documentation that is quite complex to build:  First, the library 
needs to be built (it contains C extensions), then figures are 
generated by scripts, and finally Sphinx is run.  This is all done 
in a Makefile.

Piotr Ożarowski wrote:

> [PICCA Frederic-Emmanuel, 2014-04-06]
> > so I would like to know how to change this snipset to use the
> > {build_dir} for the PYTHONPATH.
> 
> you cannot really use pybuild for this, it will invoke your 
> command
> after or before each interpreter/version call. If you hardcode 
> pybuild's
> internal paths on the other hand (.pybuild/something in case of
> distutils build plugin), it will break once the internal path 
> changes...
> 
> I suggest to move building docs to install target and add
> debian/foo/usr/lib/python3/dist-packages) to PYTHONPATH. I also 
> build
> directly into debian/foo/usr/share/doc/foo/html so I feel a 
> little less
> guilty for doing it in install step ;)

With “install target”, do you mean dh_installdocs?  In our 
debian/rules, we have now

# Make documentation only if needed.
ifneq "$(shell dh_listpackages | grep -- -doc)" ""
override_dh_installdocs:
	cd doc && PYTHONPATH=$(abspath 
	debian/python-kwant/usr/lib/python2.7/dist-packages) 
	$(MAKE) html
	dh_installdocs
endif

This seems to work, but is this what you meant?  Also, I have two 
questions:

• How to get rid of the explicit mention of python2.7?

• Is the “ifneq”-clause the proper way to ensure that 
  documentation is only built for binary-indep?

I have one further more general question with regard to Debian 
packaging with pybuild.  Pybuild deletes the *.egg-info directory 
but that directory is included in the tarball as made by “setup.py 
sdist”.  (I am aware that some people consider that directory to 
be generated data, but this is debatable [1], and it’s standard 
practice to include it in the tarball anyway.)  This has the 
consequence that after running “gbp buildpackage”, some files are 
missing and thus “gbp buildpackage” cannot be re-run without “git 
checkout .”.  This situation is unsatisfactory.  Is there a 
recommended solution?

The complete Debian packaging of our library is available in a git 
repository [2].

Thanks for any hints,
Christoph

[1] https://tahoe-lafs.org/trac/tahoe-lafs/ticket/2092#comment:16
[2] http://git.kwant-project.org/debian-kwant/

Back to linux.debian.maint.python | Previous | NextNext in thread | Find similar


Thread

Re: pybuild sphinxdoc and extensions Christoph Groth <christoph@grothesque.org> - 2015-10-22 16:20 +0200
  Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2015-10-23 10:40 +0200
    Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2015-10-23 16:10 +0200
      Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2015-10-23 16:20 +0200
        Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2015-10-23 16:30 +0200
          Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2015-10-23 17:10 +0200
            Re: pybuild sphinxdoc and extensions Christoph Groth <christoph@grothesque.org> - 2016-02-25 22:40 +0100
              Re: pybuild sphinxdoc and extensions Piotr Ożarowski <piotr@debian.org> - 2016-02-25 23:20 +0100
                Re: pybuild sphinxdoc and extensions Christoph Groth <christoph@grothesque.org> - 2016-02-27 21:40 +0100
          Re: pybuild sphinxdoc and extensions Dimitri John Ledkov <xnox@debian.org> - 2015-10-23 17:50 +0200
            Re: pybuild sphinxdoc and extensions "Lennart Sorensen" <lsorense@csclub.uwaterloo.ca> - 2015-10-23 19:50 +0200

csiph-web