From a3d496a8822109a2dc898c51ae45d2e6813200c3 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Wed, 10 Jul 2013 11:38:00 -0400 Subject: [PATCH] Set sys.path properly for docs to build. We used to do it this way, I'm not sure why it was changed. Our settings files add directories to the path, so we need to do it here so that names will be importable. --- docs/source/conf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 2c398c1b9a..ae2d8c6015 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -21,7 +21,17 @@ import os # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # sys.path.insert(0, os.path.abspath('.')) -sys.path.insert(0, os.path.abspath('../..')) # mitx folder + +mitx = os.path.abspath('../..') + +sys.path.append(mitx) +sys.path.append(os.path.join(mitx, "common/djangoapps")) +sys.path.append(os.path.join(mitx, "common/lib")) +sys.path.append(os.path.join(mitx, "common/lib/sandbox-packages")) +sys.path.append(os.path.join(mitx, "lms/djangoapps")) +sys.path.append(os.path.join(mitx, "lms/lib")) +sys.path.append(os.path.join(mitx, "cms/djangoapps")) +sys.path.append(os.path.join(mitx, "cms/lib")) # django configuration - careful here os.environ['DJANGO_SETTINGS_MODULE'] = 'lms.envs.test'