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


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

Re: how to build sphinx doc when there is extension

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Piotr Ożarowski <piotr@debian.org>
Newsgroups linux.debian.maint.python
Subject Re: how to build sphinx doc when there is extension
Date Tue, 30 Aug 2016 10:20:01 +0200
Message-ID <sbMqZ-2gM-1@gated-at.bofh.it> (permalink)
References <sbLOi-1No-21@gated-at.bofh.it>
X-Mailbox-Line From debian-python-request@lists.debian.org Tue Aug 30 08:14:57 2016
Old-Return-Path <piotr@ozarowski.pl>
X-Amavis-Spam-Status No, score=-6.899 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, FOURLA=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, LDO_WHITELIST=-5] autolearn=ham autolearn_force=no
X-Policyd-Weight using cached result; rate:hard: -6.1
Mail-Followup-To debian-python@lists.debian.org
MIME-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Disposition inline
Content-Transfer-Encoding 8bit
X-Operating-System Debian GNU/Linux (4.6.0-0.bpo.1-rt-amd64)
User-Agent Mutt/1.6.2-neo (2016-07-23)
X-Mailing-List <debian-python@lists.debian.org> archive/latest/14168
List-ID <debian-python.lists.debian.org>
List-URL <https://lists.debian.org/debian-python/>
List-Archive https://lists.debian.org/msgid-search/20160830081441.7qi5at5jps52qga7@sar0.p1otr.com
Approved robomod@news.nic.it
Lines 32
Organization linux.* mail to news gateway
Sender robomod@news.nic.it
X-Original-Date Tue, 30 Aug 2016 10:14:41 +0200
X-Original-Message-ID <20160830081441.7qi5at5jps52qga7@sar0.p1otr.com>
X-Original-References <A2A20EC3B8560D408356CAC2FC148E53BB2C8491@SUN-DAG3.synchrotron-soleil.fr>
Xref csiph.com linux.debian.maint.python:8827

Show key headers only | View raw


[PICCA Frederic-Emmanuel, 2016-08-30]
> I am using this snipset when I want to build the sphinx documentation for all python available. (this is a sort of unit test).
> Usually the sphinx doc use auto-doc and then it allows to check that all modules can be imported. 
> 
> override_dh_sphinxdoc:
> ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
> 	PYBUILD_SYSTEM=custom \
> 	PYBUILD_BUILD_ARGS="cd doc && PYTHONPATH={build_dir} http_proxy='127.0.0.1:9' {interpreter} -c \"import sys;from sphinx import main;sys.exit(main(sys.argv))\" -N -bhtml source build/html" dh_auto_build  # HTML generator
> 	dh_installdocs "doc/build/html" -p python-pyfai-doc
> 	dh_sphinxdoc -O--buildsystem=pybuild
> endif
> 
> 
> I would like your opinion about this and if there is better way to do this ?

how about doing it outside pybuild? Do you really need to build it for
each interpreter / version?


If you need the build dir:

override_dh_sphinxdoc:
ifeq (,$(findstring nodocs, $(DEB_BUILD_OPTIONS)))
	PYTHONPATH=$(pybuild --system=custom -i python3 --build --build-args="echo {build_dir}") \
	cd doc && http_proxy='127.0.0.1:9' sphinx-build -N -bhtml source build/html
	dh_installdocs "doc/build/html" -p python-pyfai-doc
	dh_sphinxdoc -O--buildsystem=pybuild
endif
-- 
Piotr Ożarowski                         Debian GNU/Linux Developer
www.ozarowski.pl          www.griffith.cc           www.debian.org
GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645

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


Thread

how to build sphinx doc when there is extension PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2016-08-30 09:40 +0200
  Re: how to build sphinx doc when there is extension Piotr Ożarowski <piotr@debian.org> - 2016-08-30 10:20 +0200
    RE:how to build sphinx doc when there is extension PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2016-08-30 10:40 +0200
      Re: how to build sphinx doc when there is extension Ben Finney <ben+debian@benfinney.id.au> - 2016-08-30 23:10 +0200
  Re: how to build sphinx doc when there is extension Dmitry Shachnev <mitya57@debian.org> - 2016-08-31 20:10 +0200
    RE:how to build sphinx doc when there is extension PICCA Frederic-Emmanuel <frederic-emmanuel.picca@synchrotron-soleil.fr> - 2016-08-31 21:00 +0200

csiph-web