From 9a86e27d5da17f8eed65b50ee9373ddea44dffc1 Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Tue, 10 Oct 2023 00:07:00 -0700 Subject: [PATCH] . --- container/BUILD | 5 +---- container/force_py2.py | 9 --------- 2 files changed, 1 insertion(+), 13 deletions(-) delete mode 100644 container/force_py2.py 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)