Martin Panter added the comment: This patch ports the logic written for Issue 26662 to Python 2. Basically, configure searches for commands called python2.7, python2, and python (in order of priority), and sets PYTHON_FOR_GEN to the result. PYTHON_FOR_GEN could be overridden by the user if desired. If no Python command is found, the build fails with an error message:
Cannot generate /home/proj/python/cpython/Python/Python-ast.c, python not found ! To skip re-generation of /home/proj/python/cpython/Python/Python-ast.c run <make touch> or <make -t /home/proj/python/cpython/Python/Python-ast.c>. Otherwise, set python in PATH and run configure or run <make PYTHON_FOR_GEN=python>. --- Python/Python-ast.c --- *** [Python/Python-ast.c] Error code 1 However if it finds “python” and that turns out to be version 3, it will still have the same problem as now, and you will have to manually use “make touch” or similar. ---------- Added file: http://bugs.python.org/file44732/PYTHON_FOR_GEN.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28143> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com