Doc: fix import of asdl.py when called from outside Doc/. (GH-21529) (#21567)

(cherry picked from commit 7f03445d01)

Co-authored-by: Julien Palard <julien@palard.fr>
This commit is contained in:
Miss Islington (bot) 2020-07-20 10:18:17 -07:00 committed by GitHub
parent add7cfc4c6
commit 94647837d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
import os
import sys
sys.path.append(os.path.abspath("../Parser/"))
from pathlib import Path
CPYTHON_ROOT = Path(__file__).resolve().parent.parent.parent.parent
sys.path.append(str(CPYTHON_ROOT / "Parser"))
from pygments.lexer import RegexLexer, bygroups, include, words
from pygments.token import (Comment, Generic, Keyword, Name, Operator,