[Python-modules-team] Bug#908078: should detect when 'nodoc' is active, then --with sphinxdoc should do nil
Nicholas D Steeves
nsteeves at gmail.com
Wed Sep 5 22:36:11 BST 2018
Package: sphinx-common
Version: 1.7.8-1
Severity: normal
Part of the purpose of building with 'nodoc' is the omission of
build-deps. dh_sphinxdoc should detect when 'nodoc' is active, then
--with sphinxdoc should not attempt to do anything, other than print
that it is doing nothing, because 'nodoc' is active.
Steps to reproduce:
--- a/debian/control
+++ b/debian/control
, python3-mock <!nocheck>
, python3-nose <!nocheck>
, python3-pip <!nocheck>
- , python3-sphinx
- , texinfo
+ , python3-sphinx <!nodoc>
+ , texinfo <!nodoc>
Standards-Version: 4.2.1
Vcs-Browser: https://salsa.debian.org/emacsen-team/elpy
Vcs-Git: https://salsa.debian.org/emacsen-team/elpy.git
--- a/debian/rules
+++ b/debian/rules
# docs are not generated without this override
override_dh_auto_build:
dh_auto_build
- PYTHONPATH=. sphinx-build -N -bman docs/ build/man # Manpage generator
+# support the nodoc build profile
+ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
+ echo -e "\nnodoc build profile enabled, therefor not building docs.\n"
+else
+ PYTHONPATH=. sphinx-build -N -bman docs/ build/man
PYTHONPATH=. sphinx-build -N -btexinfo docs/ build/info
makeinfo --no-split build/info/Elpy.texi -o build/info/elpy.info
cat NEWS.rst debian/local-var-snippet > build/NEWS
+endif
At this point dpkg-buildpackage will fail, because python3-sphinx is
not installed. Python3-sphinx is only installed when <!nodoc> is
true, which is part of the purpose of building with 'nodoc'. Of
course I was able to work around this issue by adding the following:
--- a/debian/rules
+++ b/debian/rules
export LC_ALL
%:
+ifneq ($(filter nodoc,$(DEB_BUILD_PROFILES)),)
+ echo -e "\nnodoc profile enabled, building without sphinxdoc..\n"
+ dh $@ --with elpa,python3 --buildsystem=pybuild
+else
dh $@ --with elpa,python3,sphinxdoc --buildsystem=pybuild
+endif
It would be best if dh_sphinxdoc had its own 'ifneq ($(filter
nodoc,$(DEB_BUILD_PROFILES)),)' logic. I suspect this is a trivially
easy fix that could even be tagged 'newcomer'.
Cheers,
Nicholas
More information about the Python-modules-team
mailing list