From 7d9352d3fbc1453cc631d798371983f97ff9f0a9 Mon Sep 17 00:00:00 2001 From: Rohan Joyce Date: Thu, 29 Apr 2021 15:24:13 -0400 Subject: [PATCH] Define version-specific shebangs for the default python runtimes --- tools/python/toolchain.bzl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/python/toolchain.bzl b/tools/python/toolchain.bzl index 15b70105c83d8b..0870173b81ea97 100644 --- a/tools/python/toolchain.bzl +++ b/tools/python/toolchain.bzl @@ -174,6 +174,7 @@ def define_autodetecting_toolchain( name = "_autodetecting_py2_runtime", interpreter = ":py2wrapper.sh", python_version = "PY2", + stub_shebang = "#!/usr/bin/env python2", visibility = ["//visibility:private"], ) @@ -181,6 +182,7 @@ def define_autodetecting_toolchain( name = "_autodetecting_py3_runtime", interpreter = ":py3wrapper.sh", python_version = "PY3", + stub_shebang = "#!/usr/bin/env python3", visibility = ["//visibility:private"], ) @@ -188,6 +190,7 @@ def define_autodetecting_toolchain( name = "_autodetecting_py2_runtime_nonstrict", interpreter = ":py2wrapper_nonstrict.sh", python_version = "PY2", + stub_shebang = "#!/usr/bin/env python2", visibility = ["//visibility:private"], ) @@ -195,6 +198,7 @@ def define_autodetecting_toolchain( name = "_autodetecting_py3_runtime_nonstrict", interpreter = ":py3wrapper_nonstrict.sh", python_version = "PY3", + stub_shebang = "#!/usr/bin/env python3", visibility = ["//visibility:private"], )