diff options
| author | Georg Brandl <georg@python.org> | 2011-11-01 09:13:41 +0100 |
|---|---|---|
| committer | Georg Brandl <georg@python.org> | 2011-11-01 09:13:41 +0100 |
| commit | 7b39fc6eb4f4859f120c78c37cdf96adb6ee96dc (patch) | |
| tree | 2d496def841ff38e4e0d546cb9341a0b1cb9c8f6 /sphinx/pycode | |
| parent | ca5f06a84b66a94b7b8b5c8ed8372ad39b470a47 (diff) | |
| download | sphinx-7b39fc6eb4f4859f120c78c37cdf96adb6ee96dc.tar.gz | |
Closes #796: use package_dir everywhere instead of __file__.
Diffstat (limited to 'sphinx/pycode')
| -rw-r--r-- | sphinx/pycode/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/pycode/__init__.py b/sphinx/pycode/__init__.py index 09f7e220..ef626f6d 100644 --- a/sphinx/pycode/__init__.py +++ b/sphinx/pycode/__init__.py @@ -11,6 +11,7 @@ from os import path +from sphinx import package_dir from sphinx.errors import PycodeError from sphinx.pycode import nodes from sphinx.pycode.pgen2 import driver, token, tokenize, parse, literals @@ -20,7 +21,7 @@ from sphinx.util.docstrings import prepare_docstring, prepare_commentdoc # load the Python grammar -_grammarfile = path.join(path.dirname(__file__), 'Grammar.txt') +_grammarfile = path.join(package_dir, 'pycode', 'Grammar.txt') pygrammar = driver.load_grammar(_grammarfile) pydriver = driver.Driver(pygrammar, convert=nodes.convert) |
