Reworked the installation of the Dynare sphinx domain and pygment lexer.
parent
f4ce25c982
commit
9e3141482b
|
@ -2,5 +2,5 @@
|
||||||
python/*
|
python/*
|
||||||
src/build/*
|
src/build/*
|
||||||
src/source/__pycache__/*
|
src/source/__pycache__/*
|
||||||
py/domain/__pycache__/*
|
utils/__pycache__/*
|
||||||
src/source/_static/mathjax/*
|
src/source/_static/mathjax/*
|
4
Makefile
4
Makefile
|
@ -40,8 +40,8 @@ python: python/bin/python3
|
||||||
python/bin/python3:
|
python/bin/python3:
|
||||||
python3 -m venv python
|
python3 -m venv python
|
||||||
. python/bin/activate ; pip3 install --upgrade pip ; pip3 install sphinx recommonmark sphinx_rtd_theme
|
. python/bin/activate ; pip3 install --upgrade pip ; pip3 install sphinx recommonmark sphinx_rtd_theme
|
||||||
cp py/pygment/dynare.py python/lib/python3.*/site-packages/pygments/lexers/
|
# cp py/pygment/dynare.py python/lib/python3.*/site-packages/pygments/lexers/
|
||||||
cd python/lib/python3.*/site-packages/pygments/lexers ; python3 _mapping.py
|
# cd python/lib/python3.*/site-packages/pygments/lexers ; python3 _mapping.py
|
||||||
|
|
||||||
mathjax: src/source/_static/mathjax/MathJax.js
|
mathjax: src/source/_static/mathjax/MathJax.js
|
||||||
@touch src/source/_static/mathjax/MathJax.js
|
@touch src/source/_static/mathjax/MathJax.js
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('../../py/domain/'))
|
sys.path.insert(0, os.path.abspath('../../utils'))
|
||||||
|
|
||||||
extensions = ['sphinx.ext.autodoc',
|
extensions = ['sphinx.ext.autodoc',
|
||||||
'sphinx.ext.mathjax']
|
'sphinx.ext.mathjax']
|
||||||
|
@ -92,5 +92,7 @@ man_pages = [
|
||||||
]
|
]
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
from dynare import DynDomain
|
from dynare_dom import DynareDomain
|
||||||
app.add_domain(DynDomain)
|
from dynare_lex import DynareLexer
|
||||||
|
app.add_lexer("dynare", DynareLexer())
|
||||||
|
app.add_domain(DynareDomain)
|
||||||
|
|
|
@ -287,7 +287,7 @@ class DynareXRefRole(XRefRole):
|
||||||
|
|
||||||
############### Dynare domain #######################
|
############### Dynare domain #######################
|
||||||
|
|
||||||
class DynDomain(Domain):
|
class DynareDomain(Domain):
|
||||||
name = 'dynare'
|
name = 'dynare'
|
||||||
label = 'Dynare'
|
label = 'Dynare'
|
||||||
object_types = {
|
object_types = {
|
Loading…
Reference in New Issue