Skip to content

Commit 5ea2b0e

Browse files
committed
Merge pull request astropy#82 from larrybradley/sphinx
Import astropy_helpers from inside the docs/ directory
2 parents f088775 + e159e68 commit 5ea2b0e

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎docs/conf.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,15 @@
2929
import os
3030
import sys
3131

32+
try:
33+
import astropy_helpers
34+
except ImportError:
35+
# Building from inside the docs/ directory?
36+
if os.path.basename(os.getcwd()) == 'docs':
37+
a_h_path = os.path.abspath(os.path.join('..', 'astropy_helpers'))
38+
if os.path.isdir(a_h_path):
39+
sys.path.insert(1, a_h_path)
40+
3241
# Load all of the global Astropy configuration
3342
from astropy_helpers.sphinx.conf import *
3443

0 commit comments

Comments
 (0)