Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sage
Path: blob/develop/src/sage_docbuild/build_options.py
4052 views
1
r"""
2
Build options
3
4
This module defines options for building Sage documentation.
5
"""
6
7
import argparse
8
import os
9
from pathlib import Path
10
11
SPHINXOPTS = ""
12
PAPER = ""
13
OMIT = ["introspect"] # docs/dirs to omit when listing and building 'all'
14
15
if PAPER:
16
PAPEROPTS = "-D latex_paper_size=" + PAPER
17
else:
18
PAPEROPTS = ""
19
20
# Note that this needs to have the doctrees dir
21
ALLSPHINXOPTS = SPHINXOPTS + " " + PAPEROPTS + " "
22
WEBSITESPHINXOPTS = ""
23
24
# Number of threads to use for parallel-building the documentation.
25
NUM_THREADS = int(os.environ.get('SAGE_NUM_THREADS', 1))
26
27
# Error out on errors
28
ABORT_ON_ERROR = True
29
30
class BuildOptions(argparse.Namespace):
31
source_dir: Path
32
output_dir: Path
33
34