Do not depend on where build is run.

This commit is contained in:
chriseth 2018-05-14 21:59:13 +02:00
parent 7f97995e11
commit 2f4faef606

View File

@ -22,7 +22,8 @@ import re
# documentation root, use os.path.abspath to make it absolute, like shown here.
def setup(sphinx):
sys.path.insert(0, os.path.abspath('./utils'))
thisdir = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, thisdir + '/utils')
from SolidityLexer import SolidityLexer
sphinx.add_lexer('Solidity', SolidityLexer())