* Ben Finney <ben+deb...@benfinney.id.au>, 2014-01-26, 22:08:
How can I convince ‘dh_python3’ to set the shebang to the *default* Python 3 interpreter?

dh_python3 --shebang=/usr/bin/python3
(if I recall correctly)

Thanks. So the manpage doesn't say, should I add that option for the “build” action? The “install” action? Some other action? Reading the source for ‘dh-python’ isn't very enlightening on this.

You normally call dh_python3 in binary* targets. (Not sure if that's what you're asking, though...)

The important part is that I need to override the shebang rewrite for only *some* programs, and leave it with the default behaviour for others.

Oops, I missed that bit in your original mail. There's --exclude option that looked promising to me, but it doesn't seem to have any effect of shebang rewriting. :/

In this case, I think the best you can do is to edit the shebang with sed. Adding this after dh_auto_install should do the trick:

        sed -i -e '1 s,^#!.*,#!/usr/bin/python3,' 
$(package_install_bin_dir)/python3-coverage

--
Jakub Wilk


--
To UNSUBSCRIBE, email to debian-python-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20140127002026.ga8...@jwilk.net

Reply via email to