Add a script to invoke mkdocs

This commit is contained in:
Victor Zverovich
2024-06-02 09:29:07 -07:00
parent 871538d3ab
commit 75ab3bc2a0
2 changed files with 11 additions and 123 deletions

11
support/run-mkdocs Executable file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env python3
# A script to invoke mkdocs with the correct environment.
import os, subprocess, sys
# Set PYTHONPATH for the mkdocstrings handler.
env = os.environ.copy()
path = env.get('PYTHONPATH')
env['PYTHONPATH'] = (path + ':' if path else '') + os.path.dirname(__file__)
subprocess.run(['mkdocs'] + sys.argv[1:], env=env)