mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-24 07:53:30 +08:00
Merge confict
This commit is contained in:
commit
cc39e0f692
@ -213,7 +213,7 @@ def _run_pdoc() -> None:
|
||||
duration = time.monotonic() - starttime
|
||||
print(f'{Clr.GRN}Generated pdoc documentation in {duration:.1f}s.{Clr.RST}')
|
||||
|
||||
def generate_sphinxdoc() -> None:
|
||||
def generate_sphinxdoc() -> None:
|
||||
_run_sphinx()
|
||||
|
||||
def _run_sphinx() -> None:
|
||||
@ -224,11 +224,11 @@ def _run_sphinx() -> None:
|
||||
from batools.version import get_current_version
|
||||
version, buildnum = get_current_version()
|
||||
|
||||
assets_dirs : dict = {'ba_data':'src/assets/ba_data/python/',
|
||||
'dummy_modules':'build/dummymodules/',
|
||||
assets_dirs : dict = {'ba_data':'src/assets/ba_data/python/',
|
||||
'dummy_modules':'build/dummymodules/',
|
||||
'efro_tools':'tools/', # for efro and bacommon package
|
||||
}
|
||||
|
||||
|
||||
sphinx_src = 'src/assets/sphinx/'
|
||||
template_dir = Path(sphinx_src+'template/')
|
||||
assert template_dir.is_dir()
|
||||
@ -237,26 +237,25 @@ def _run_sphinx() -> None:
|
||||
sphinx_apidoc_out = '.cache/sphinx/' # might want to use .cache dir
|
||||
os.makedirs(sphinx_apidoc_out, exist_ok=True)
|
||||
|
||||
|
||||
|
||||
os.environ['BALLISTICA_ROOT'] = os.getcwd()
|
||||
|
||||
|
||||
shutil.copytree(template_dir, sphinx_apidoc_out, dirs_exist_ok= True)
|
||||
|
||||
|
||||
starttime = time.monotonic()
|
||||
os.environ['BA_RUNNING_WITH_DUMMY_MODULES'] = '1'
|
||||
apidoc_cmd = ['sphinx-apidoc',
|
||||
apidoc_cmd = ['sphinx-apidoc',
|
||||
'-f', # Force overwriting of any existing generated files.
|
||||
'-H', 'Bombsquad', # project
|
||||
'-A','Efroemling', # author
|
||||
'-V', str(version), # version
|
||||
'-R', str(buildnum), # release
|
||||
# '--templatedir', template_dir,
|
||||
# '--templatedir', template_dir,
|
||||
'-o', sphinx_apidoc_out,
|
||||
]
|
||||
subprocess.run(apidoc_cmd + [assets_dirs['ba_data']] , check=True)
|
||||
subprocess.run(apidoc_cmd + [assets_dirs['dummy_modules']], check=True)
|
||||
subprocess.run(apidoc_cmd + [assets_dirs['ba_data']] , check=True)
|
||||
subprocess.run(apidoc_cmd + [assets_dirs['dummy_modules']], check=True)
|
||||
subprocess.run(apidoc_cmd + [assets_dirs['efro_tools']], check=True)
|
||||
|
||||
|
||||
subprocess.run( ['make', 'html'], check = True, cwd= sphinx_apidoc_out)
|
||||
shutil.copytree(sphinx_apidoc_out + '_build/html/', build_dir, dirs_exist_ok=True)
|
||||
# shutil.rmtree(temp_modules_dir)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user