From: Ole Streicher <olebole@debian.org>
Date: Fri, 31 Jan 2020 13:09:57 +0100
Subject: Disable intersphinx mapping for Debian package builds

Closes: #949464
---
 sphinx_astropy/conf/v1.py | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/sphinx_astropy/conf/v1.py b/sphinx_astropy/conf/v1.py
index fc98db8..b13fc40 100644
--- a/sphinx_astropy/conf/v1.py
+++ b/sphinx_astropy/conf/v1.py
@@ -66,6 +66,10 @@ intersphinx_mapping = {
     'astropy': ('https://docs.astropy.org/en/stable/', None),
     'h5py': ('https://docs.h5py.org/en/stable/', None)}
 
+# Disable intersphinx mapping for Debian package builds
+if 'DH_INTERNAL_BUILDFLAGS' in os.environ:
+    intersphinx_mapping = {}
+
 # List of patterns, relative to source directory, that match files and
 # directories to ignore when looking for source files.
 exclude_patterns = ['_build']
