This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Use PYTHON when calling Parser/asdl_c.py
Type: Stage: resolved
Components: Build Versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 2.7, Python 2.6
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: henry.precheur, r.david.murray
Priority: normal Keywords: patch

Created on 2011-06-27 12:53 by henry.precheur, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
fix_ASDLGEN.diff henry.precheur, 2011-06-27 12:53
Messages (3)
msg139264 - (view) Author: Henry Precheur (henry.precheur) Date: 2011-06-27 12:53
Parser/asdl_c.py uses `/usr/bin/env python' as an interpreter. But Python executable is not always `python'. With OpenBSD's ports, CPython's interpreters are installed as pythonX.Y. There's a variable PYTHON in the Makefile, that's what should be used.

This way make PYTHON=python2.7 works on OpenBSD.

The attached patch fixes that.

Note that the executable bit and the hashbang can be removed from asdl_c.py if the patch is applied.
msg139267 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2011-06-27 13:30
I don't believe we have any desire to support unix systems that do not define 'python', and 'python3' executables in the path.  If the distribution wishes to do that they'll have to patch everything to accommodate it.

That however is mostly irrelevant to this case.  asdl_c.py is not needed for building python.  The files it generates are already generated and included in the release tarballs, and in the release tarballs the file timestamps should be such that asdl_c.py is not invoked.  (When working from a checkout this may not be true due to vcs tool file timestamp issues; you just have to touch the files manually in that case.)  When the file *is* run, it is not the python being built that is used to run it, it is an already existing python.  So using the PYTHON variable in the Makefile would be incorrect.
msg139270 - (view) Author: Henry Precheur (henry.precheur) Date: 2011-06-27 13:46
Indeed, I didn't realize that PYTHON was the name of the target interpreter and not the name a an already installed interpreter.
History
Date User Action Args
2022-04-11 14:57:19adminsetgithub: 56630
2011-06-27 13:46:46henry.precheursetmessages: + msg139270
2011-06-27 13:30:17r.david.murraysetstatus: open -> closed

nosy: + r.david.murray
messages: + msg139267

resolution: not a bug
stage: resolved
2011-06-27 12:53:36henry.precheurcreate