Fix doc build
This commit is contained in:
17
support/mkdocs
Executable file
17
support/mkdocs
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env python3
|
||||
# A script to invoke mkdocs with the correct environment.
|
||||
|
||||
import os, subprocess, sys
|
||||
|
||||
dirname = os.path.join(os.path.dirname(__file__), 'python')
|
||||
|
||||
# Set PYTHONPATH for the mkdocstrings handler.
|
||||
env = os.environ.copy()
|
||||
path = env.get('PYTHONPATH')
|
||||
env['PYTHONPATH'] = (path + ':' if path else '') + dirname
|
||||
|
||||
config_path = os.path.join(dirname, 'mkdocs.yml')
|
||||
args = sys.argv[1:]
|
||||
if 'build' in args:
|
||||
args += ['-f', config_path]
|
||||
subprocess.run(['mkdocs'] + args, env=env)
|
||||
Reference in New Issue
Block a user