diff --git a/faq.rst b/faq.rst --- a/faq.rst +++ b/faq.rst @@ -308,7 +308,8 @@ the build process, you may sometimes run into issues when attempting to switch between Python 2.x and Python 3.x branches. In these cases, it is best to run a ``make distclean`` to ensure that all previously built files -are removed. +are removed. Also see the section on :ref:`Build Troubleshooting +`. I want to keep a separate working copy per development branch, is it possible? @@ -805,6 +806,30 @@ .. _configuration options: http://www.selenic.com/mercurial/hgrc.5.html +.. _build-troubleshooting: + +Build Troubleshooting +===================== + +How do I fix "SyntaxError: invalid syntax" in Parser/asdl_c.py? +--------------------------------------------------------------- + +If you get an error like the following when building:: + + ... + File "./Parser/asdl_c.py", line 1 + print "Must specify exactly one output file" + ^ + SyntaxError: invalid syntax + make: *** [Include/Python-ast.h] Error 1 + +it may be because you :ref:`switched from a 3.x branch to a 2.x branch +` before building. Try the following before running the +build command again:: + + $ touch Include/Python-ast.h Python/Python-ast.c + + SSH ======= @@ -924,5 +949,5 @@ message, then it is necessary to identify any Python build directories as auto-load safe. One way to achieve this is to add a line like the following to ``~/.gdbinit`` (edit the specific list of paths as appropriate):: - + add-auto-load-safe-path ~/devel/py3k:~/devel/py32:~/devel/py27 diff --git a/setup.rst b/setup.rst --- a/setup.rst +++ b/setup.rst @@ -76,6 +76,8 @@ only on pure Python code the pydebug build provides several useful checks that one should not skip. +If you encounter unexpected errors when compiling, also consult the +:ref:`Build Troubleshooting ` section of the FAQ. Build dependencies ''''''''''''''''''