diff --git a/container/BUILD b/container/BUILD index 9f3e7c1b1..574caba1a 100644 --- a/container/BUILD +++ b/container/BUILD @@ -66,11 +66,8 @@ py_binary( py_binary( name = "build_tar", - srcs = ["build_tar.py", "force_py2.py"], + srcs = ["build_tar.py"], srcs_version = "PY2AND3", - # We enforce Python 2 here because otherwise the checksum of the generated TAR - # will not be consistent. See: https://github.com/databricks/rules_docker/pull/5 - main = "force_py2.py", visibility = ["//visibility:public"], deps = [ "@bazel_tools//third_party/py/six", diff --git a/container/force_py2.py b/container/force_py2.py deleted file mode 100644 index 56c50eb83..000000000 --- a/container/force_py2.py +++ /dev/null @@ -1,9 +0,0 @@ -import sys -import os - -if __name__ == '__main__': - argv = sys.argv - path, _ = os.path.split(argv[0]) - argv[0] = os.path.join(path, 'build_tar.py') - argv = ['/usr/bin/env', 'python2'] + argv - os.execv(argv[0], argv)