r"""1Build options23This module defines options for building Sage documentation.4"""56import argparse7import os8from pathlib import Path910SPHINXOPTS = ""11PAPER = ""12OMIT = ["introspect"] # docs/dirs to omit when listing and building 'all'1314if PAPER:15PAPEROPTS = "-D latex_paper_size=" + PAPER16else:17PAPEROPTS = ""1819# Note that this needs to have the doctrees dir20ALLSPHINXOPTS = SPHINXOPTS + " " + PAPEROPTS + " "21WEBSITESPHINXOPTS = ""2223# Number of threads to use for parallel-building the documentation.24NUM_THREADS = int(os.environ.get('SAGE_NUM_THREADS', 1))2526# Error out on errors27ABORT_ON_ERROR = True2829class BuildOptions(argparse.Namespace):30source_dir: Path31output_dir: Path323334