[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Detect whether a debuild is running



Hi,

we got a bug report about network access during build (#949464) that was
caused by sphinxdoc. The root of this is a list maintained in another
package, python3-sphinx-astropy (sphinx_astropy/conf/v1.py):

intersphinx_mapping = {
    'python': ('https://docs.python.org/3/',
               (None, 'http://data.astropy.org/intersphinx/python3.inv')),
    [...]}

Since this is a nice central place to fix the problem by disabling the
inventory (or using a local one), I would like to make this dependent of
whether it is actually used to build a Debian package. Something like:

if 'DH_INTERNAL_BUILDFLAGS' not in os.environ:
    intersphinx_mapping = {
        'python': ('https://docs.python.org/3/',
                   (None, 'http://data.astropy.org/intersphinx/python3.inv')),
        [...]}

However, I am not sure what the canonical way is to detect whether a
debian build runs. How should one solve this?

Best regards

Ole


Reply to: