Patchwork [6,of,6] packaging: use /usr/bin/python3 shebang for scripts in Debian

login
register
mail settings
Submitter Denis Laxalde
Date Oct. 21, 2019, 10 a.m.
Message ID <e43bf6c8bef28ebe832e.1571652058@marimba>
Download mbox | patch
Permalink /patch/42513/
State Accepted
Headers show

Comments

Denis Laxalde - Oct. 21, 2019, 10 a.m.
# HG changeset patch
# User Denis Laxalde <denis@laxalde.org>
# Date 1571651339 -7200
#      Mon Oct 21 11:48:59 2019 +0200
# Node ID e43bf6c8bef28ebe832ee15fe2364dadfe010f1d
# Parent  9bf954c0df8f059ce6d8ec1474f7aeebff92db4b
packaging: use /usr/bin/python3 shebang for scripts in Debian

"hg" script is already correct because it is handled by setup.py but
"hg-ssh" will be rewritten by dh_python into "/usr/bin/python" which is
not wanted as we target Python 3. By passing --shebang=/usr/bin/python3
to dh_python3, we force shebangs to be set with this value.

Patch

diff --git a/contrib/packaging/debian/rules b/contrib/packaging/debian/rules
--- a/contrib/packaging/debian/rules
+++ b/contrib/packaging/debian/rules
@@ -14,7 +14,7 @@  override_dh_auto_test:
 	http_proxy='' dh_auto_test -- TESTFLAGS="-j$(CPUS)"
 
 override_dh_python3:
-	dh_python3
+	dh_python3 --shebang=/usr/bin/python3
 	find debian/mercurial/usr/share -type d -empty -delete
 
 override_dh_install: