from urllib.request import urlopen

_conf_url = \
        "https://raw.githubusercontent.com/inducer/sphinxconfig/main/sphinxconfig.py"
#with urlopen(_conf_url) as _inf:
with open("sphinxconfig.py") as _inf:
    exec(compile(_inf.read(), _conf_url, "exec"), globals())

project = "PyCUDA"
html_theme = "alabaster"

copyright = "2008-21, Andreas Kloeckner"

ver_dic = {}
exec(
    compile(
        open("../pycuda/__init__.py").read(), "../pycuda/__init__.py", "exec"
    ),
    ver_dic,
)
version = ".".join(str(x) for x in ver_dic["VERSION"])
# The full version, including alpha/beta/rc tags.
release = ver_dic["VERSION_TEXT"]

intersphinx_mapping = {
        'file:///usr/share/doc/python3-doc/html/':
           '/usr/share/doc/python3-doc/html/objects.inv',
    "https://numpy.org/doc/stable/": None,
        'file:///usr/share/doc/python-mako-doc/html/':
            '/usr/share/doc/python-mako-doc/html/objects.inv'
}

mathjax_path = "file:///usr/share/javascript/mathjax/mathjax/MathJax.js"
