mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-29 00:35:03 +00:00
15 lines
430 B
Python
Executable File
15 lines
430 B
Python
Executable File
#!/usr/bin/env python3
|
|
# A script to invoke mkdocs with the correct environment.
|
|
|
|
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 '') + dirname
|
|
|
|
config_path = os.path.join(dirname, 'mkdocs.yml')
|
|
subprocess.run(['mkdocs'] + sys.argv[1:] + ['-f', config_path], env=env)
|