Skip to content

Commit

Permalink
Make parallel optional
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Sep 12, 2024
1 parent b82ddf0 commit a2b630f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion nbsite/cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def build(what='html',
branch='main',
org='',
binder='none',
parallel=False,
examples='examples',
examples_assets='assets',
clean_dry_run=False,
Expand Down Expand Up @@ -89,7 +90,8 @@ def build(what='html',
for path in glob.glob(os.path.join(paths['doc'], '**', '*.ipynb'), recursive=True):
print('Removing evaluated notebook from {}'.format(path))
os.remove(path)
cmd = ["sphinx-build", "-vvv", "-j", "auto", "-b", what, paths['doc'], output]
extras = ["-j", "auto"] if parallel else []
cmd = ["sphinx-build", "-b", what, paths['doc'], output] + extras
subprocess.check_call(cmd, env=merged_env)
print('Copying json blobs (used for holomaps) from {} to {}'.format(paths['doc'], output))
copy_files(paths['doc'], output, '**/*.json')
Expand Down

0 comments on commit a2b630f

Please sign in to comment.