automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting python interpreter in scripts


From: Adam Mercer
Subject: Setting python interpreter in scripts
Date: Wed, 31 Jul 2013 16:23:26 -0500

Hi

In one of our projects we have several python scripts that we need to
ensure that the python interpreter is set to the one found by
configure. At the moment we are doing this by having the interpreter
set to @PYTHONPROG@ and then using the following rule:

python_config.sed:
  @-rm -f python_config.sed
  @echo "address@hidden@address@hidden@+g" >> python_config.sed

script: $(srcdir)/script.in python_config.sed
  $(AM_V_GEN)sed -f python_config.sed $(srcdir)/script.in > script
  @chmod +x script

This has always seemed like an ugly hack to me, especially as the
script is in the VCS as script.in instead of the actual name.

Can anyone offer any more sane ways of accomplishing this?

Cheers

Adam



reply via email to

[Prev in Thread] Current Thread [Next in Thread]