On 06/12/2011 02:18 PM, Richard W.M. Jones wrote:
>>>>> another way would be to launch python directly
giving the path to the
>>>>> python script, this is likely to solve the issue there.
>>>
>>> That IMHO avoids the problem completely and I doubt anybody would
>>> complain
>>
>> I agree, and we already use that in one place in python/Makefile.am:
>>
>> $(PYTHON) $(srcdir)/$(GENERATE) $(PYTHON)
>
> Sounds good to me. How would the python script in question support this?
(1) Rename the original script so it is called 'foo.in' (for each
original script called 'foo')
(2) At the top of 'foo.in' place the following two lines:
#!@PYTHON@
# @configure_input@
Using $(PYTHON) in appropriate Makefile.am is sufficient if the script
will only ever be invoked by a Makefile generated at configure time.
But if the script must be installed, then yes, the script.in approach is
the way to go.
--
Eric Blake eblake(a)redhat.com +1-801-349-2682
Libvirt virtualization library
http://libvirt.org