Skip to content

Commit e239f3c

Browse files
committed
Add source root dir to python path in docs/conf.py
conf.py imports the version from the local module, so it needs to have the directory in the python path, otherwise it fails with: $ sphinx-apidoc -f -e -o docs/api msal Creating file docs/api/msal.application.rst. Creating file docs/api/msal.authority.rst. Creating file docs/api/msal.exceptions.rst. Creating file docs/api/msal.mex.rst. Creating file docs/api/msal.token_cache.rst. Creating file docs/api/msal.wstrust_request.rst. Creating file docs/api/msal.wstrust_response.rst. Creating file docs/api/msal.rst. Creating file docs/api/msal.oauth2cli.assertion.rst. Creating file docs/api/msal.oauth2cli.authcode.rst. Creating file docs/api/msal.oauth2cli.oauth2.rst. Creating file docs/api/msal.oauth2cli.oidc.rst. Creating file docs/api/msal.oauth2cli.rst. Creating file docs/api/modules.rst. $ make -C docs man make: Entering directory '/home/bluca/git/microsoft-authentication-library-for-python/docs' Running Sphinx v1.8.4 Configuration error: There is a programmable error in your configuration file: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/sphinx/config.py", line 368, in eval_config_file execfile_(filename, namespace) File "/usr/lib/python3/dist-packages/sphinx/util/pycompat.py", line 150, in execfile_ exec_(code, _globals) File "/home/bluca/git/microsoft-authentication-library-for-python/docs/conf.py", line 27, in <module> from msal import __version__ as version ModuleNotFoundError: No module named 'msal' make: *** [Makefile:19: man] Error 2
1 parent be47e9e commit e239f3c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
# add these directories to sys.path here. If the directory is relative to the
1313
# documentation root, use os.path.abspath to make it absolute, like shown here.
1414
#
15-
# import os
16-
# import sys
17-
# sys.path.insert(0, os.path.abspath('.'))
15+
import os
16+
import sys
17+
sys.path.insert(0, os.path.abspath('..'))
1818

1919

2020
# -- Project information -----------------------------------------------------

0 commit comments

Comments
 (0)