Sort out directory URI config

This commit is contained in:
Victor Zverovich
2024-06-02 09:47:52 -07:00
parent 509d018101
commit dab1a65d2c
3 changed files with 6 additions and 5 deletions

View File

@@ -3,9 +3,12 @@
import os, subprocess, sys
dirname = os.path.dirname(__file__)
# Set PYTHONPATH for the mkdocstrings handler.
env = os.environ.copy()
path = env.get('PYTHONPATH')
env['PYTHONPATH'] = (path + ':' if path else '') + os.path.dirname(__file__)
env['PYTHONPATH'] = (path + ':' if path else '') + dirname
subprocess.run(['mkdocs'] + sys.argv[1:], env=env)
config_path = os.path.join(dirname, 'mkdocs.yml')
subprocess.run(['mkdocs'] + sys.argv[1:] + ['-f', config_path], env=env)