Ticket #7762: trac_7762-conf-sagenb-path.patch

File trac_7762-conf-sagenb-path.patch, 2.2 KB (added by timdumol, 10 years ago)

Uses sagenb.misc.misc.DATA instead.

  • doc/common/conf.py

    #7762 `conf.py` for Sage documentation hardcodes sagenb path
    
    diff -r 964c2f4ce74d -r d6280e78afe5 doc/common/conf.py
    a b  
    11import sys, os, re
    22SAGE_ROOT = os.environ['SAGE_ROOT']
    3 SAGE_DOC = os.path.join(SAGE_ROOT, 'devel/sage/doc')
     3SAGE_DOC = os.path.join(SAGE_ROOT, 'devel', 'sage', 'doc')
    44
    55# If your extensions are in another directory, add it here. If the directory
    66# is relative to the documentation root, use os.path.abspath to make it
     
    2121jsmath_path = 'jsmath_sage.js'
    2222
    2323# Add any paths that contain templates here, relative to this directory.
    24 templates_path = [os.path.join(SAGE_DOC, 'common/templates'), 'templates']
     24templates_path = [os.path.join(SAGE_DOC, 'common', 'templates'), 'templates']
    2525
    2626# The suffix of source filenames.
    2727source_suffix = '.rst'
     
    101101    html_theme_options['jsmath_image_fonts'] = is_package_installed('jsmath-image-fonts')
    102102
    103103# Add any paths that contain custom themes here, relative to this directory.
    104 html_theme_path = [os.path.join(SAGE_DOC, 'common/themes')]
     104html_theme_path = [os.path.join(SAGE_DOC, 'common', 'themes')]
    105105
    106106# HTML style sheet NOTE: This overrides a HTML theme's corresponding
    107107# setting.
     
    126126# Add any paths that contain custom static files (such as style sheets) here,
    127127# relative to this directory. They are copied after the builtin static files,
    128128# so a file named "default.css" will overwrite the builtin "default.css".
    129 html_static_path = [os.path.join(SAGE_DOC, 'common/static'), 'static']
     129html_static_path = [os.path.join(SAGE_DOC, 'common', 'static'), 'static']
    130130
    131131# If we're using jsMath, we prepend its location to the static path
    132132# array.  We can override / overwrite selected files by putting them
    133133# in the remaining paths.
    134134if 'SAGE_DOC_JSMATH' in os.environ:
    135     jsmath_static = os.path.join(SAGE_ROOT, 'local/lib/python/site-packages/sagenb/data/jsmath/')
     135    from sagenb.misc.misc import DATA
     136    jsmath_static = os.path.join(DATA, 'jsmath')
    136137    html_static_path.insert(0, jsmath_static)
    137138
    138139# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,