On Sat, Jun 26, 2010 at 10:29 PM, Josh Blum <j...@joshknows.com> wrote: > Somehow distutils solves this problem: > http://docs.python.org/release/2.5.2/dist/node11.html > If you figure out what its calling, perhaps we could port that the > gnuradio build system The code that does this can be seen here: http://svn.python.org/view/python/trunk/Lib/distutils/command/build_scripts.py?revision=77704&view=markup
They use the following regexp: ^#!.*python[0-9.]*([ \t].*)?$ This handles both things like /usr/bin/env python and /usr/local/bin/python, which is nice in the general case but not particularly relevant for GR. They also restrict the match to the first line of the file, which I think is prudent. One thing about the @@PYTHON@@ option is it would make the scripts no longer executable directly from the tree. Arguably you could still execute them using "python <script>" so you wouldn't lose that much, but it's something to consider. _______________________________________________ Discuss-gnuradio mailing list Discuss-gnuradio@gnu.org http://lists.gnu.org/mailman/listinfo/discuss-gnuradio