configure produces a non-working Makefile in some scenarios, due to ASDLGEN
In some scenarios, configure produces a Makefile which fails because ASDLGEN doesn't point to a working Python. In particular, it seems to assume that if there is an executable called e.g. "python3.4" on the path, then that will be a system Python. In my perhaps unusual but IMO perfectly valid setup, I have various Python repos set up like so: $HOME/projects/python | +- default | +- 3.3 | + and so on for 3.2, 3.1, 2.7 In order to facilitate testing some script against multiple Python versions, I have shell scripts in $HOME/bin named python3.4, python3.3 etc. which just run the programs in the relevant directories in $HOME/projects/python/. (I know I can do this using aliases etc., but I think that's beside the point.) When I run configure in the repo for the default branch, it appears to look for a Python on the path named python3.4, finds one in $HOME/bin, and thus generates an ASDLGEN value of "python3.4". If I happen to have a built Python in the default repo, then the script in $HOME/bin will successfully run that, and all appears well; but if I clean the default repo and re-run make, it fails at the ASDLGEN step, because the $HOME/bin/python3.4 script fails, due to not being able to invoke $HOME/projects/python/default/python. Is this a bug in configure, or is my configuration regarded as too perverse to support? Regards, Vinay Sajip
On Sun, 28 Oct 2012 18:24:36 +0000 (UTC)
Vinay Sajip
In some scenarios, configure produces a Makefile which fails because ASDLGEN doesn't point to a working Python. In particular, it seems to assume that if there is an executable called e.g. "python3.4" on the path, then that will be a system Python.
In my perhaps unusual but IMO perfectly valid setup, I have various Python repos set up like so:
$HOME/projects/python | +- default | +- 3.3 | + and so on for 3.2, 3.1, 2.7
In order to facilitate testing some script against multiple Python versions, I have shell scripts in $HOME/bin named python3.4, python3.3 etc. which just run the programs in the relevant directories in $HOME/projects/python/. (I know I can do this using aliases etc., but I think that's beside the point.)
When I run configure in the repo for the default branch, it appears to look for a Python on the path named python3.4, finds one in $HOME/bin, and thus generates an ASDLGEN value of "python3.4". If I happen to have a built Python in the default repo, then the script in $HOME/bin will successfully run that, and all appears well; but if I clean the default repo and re-run make, it fails at the ASDLGEN step, because the $HOME/bin/python3.4 script fails, due to not being able to invoke $HOME/projects/python/default/python.
Is this a bug in configure, or is my configuration regarded as too perverse to support?
The latter IMO :) Regards Antoine.
In article <20121028194043.09415a50@pitrou.net>,
Antoine Pitrou
On Sun, 28 Oct 2012 18:24:36 +0000 (UTC) Vinay Sajip
wrote: In some scenarios, configure produces a Makefile which fails because ASDLGEN doesn't point to a working Python. In particular, it seems to assume that if there is an executable called e.g. "python3.4" on the path, then that will be a system Python.
In my perhaps unusual but IMO perfectly valid setup, I have various Python repos set up like so:
$HOME/projects/python | +- default | +- 3.3 | + and so on for 3.2, 3.1, 2.7
In order to facilitate testing some script against multiple Python versions, I have shell scripts in $HOME/bin named python3.4, python3.3 etc. which just run the programs in the relevant directories in $HOME/projects/python/. (I know I can do this using aliases etc., but I think that's beside the point.)
When I run configure in the repo for the default branch, it appears to look for a Python on the path named python3.4, finds one in $HOME/bin, and thus generates an ASDLGEN value of "python3.4". If I happen to have a built Python in the default repo, then the script in $HOME/bin will successfully run that, and all appears well; but if I clean the default repo and re-run make, it fails at the ASDLGEN step, because the $HOME/bin/python3.4 script fails, due to not being able to invoke $HOME/projects/python/default/python.
Is this a bug in configure, or is my configuration regarded as too perverse to support?
The latter IMO :)
Not at all, IMO :) This behavior is a change recently introduced by the changesets associated with http://bugs.python.org/issue16262. Previously, the first `python` on $PATH was used if asdl_c.py needed to be run in the Makefile. You now have the opportunity to override the behavior at ./configure time by using the PYTHON variable to specify the path to the Python executable you want to use for the asdl_c.py step, as in: ./configure ... PYTHON=/usr/bin/python2.7 -- Ned Deily, nad@acm.org
Ned Deily
Makefile. You now have the opportunity to override the behavior at ./configure time by using the PYTHON variable to specify the path to the Python executable you want to use for the asdl_c.py step, as in:
./configure ... PYTHON=/usr/bin/python2.7
Aha! Thanks for pointing that out. Regards, Vinay Sajip
On 28Oct2012 18:24, Vinay Sajip
Cameron Simpson
Hoping this is more helpful than I've probably made it sound,
Sure. I know my setup was somewhat unusual, which is why I posted here rather than the tracker, but it was a surprise when a long-working configuration suddenly broke because of an unbuilt Python 3.4. Ned's post showed me why. Regards, Vinay Sajip
participants (4)
-
Antoine Pitrou
-
Cameron Simpson
-
Ned Deily
-
Vinay Sajip