# SPDX-FileCopyrightText: Copyright The SCons Foundation (https://scons.org)
# SPDX-License-Identifier: MIT

"""
SConstruct file for building SCons documentation.

This overview is not maintained and is not built during the doc build.
"""

import os

env = Environment(ENV={'PATH' : os.environ['PATH']},
                  tools=['docbook'],
                  toolpath=['../../SCons/Tool'])

has_pdf = False
if (env.WhereIs('fop') or
    env.WhereIs('xep')):
    has_pdf = True

env.DocbookXInclude('python10_xi.xml', 'main.xml')
env.DocbookXslt('python10.xml', 'python10_xi.xml',
                xsl='../xslt/to_docbook.xslt')
env.DocbookHtml('python10.html','python10.xml')
if has_pdf:
    env.DocbookPdf('python10.pdf','python10.xml')
