build_packages: Add entry point in chromite/

Add new entry point for build_packages in chromite/.
Currently, the new script just executes the existing
shell script and passes along any arguments.

BUG=b:216536410
TEST=manual (`build_packages --board ..`), CQ

Cq-Depend: chromium:3421525
Change-Id: Id72ba6bcf45be9a47939336e51cedf23a058f2ef
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/chromite/+/3421565
Reviewed-by: Ram Chandrasekar <rchandrasekar@google.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Cindy Lin <xcl@google.com>
Tested-by: Cindy Lin <xcl@google.com>
diff --git a/scripts/build_packages.py b/scripts/build_packages.py
new file mode 100644
index 0000000..b0cb37d
--- /dev/null
+++ b/scripts/build_packages.py
@@ -0,0 +1,29 @@
+# Copyright 2022 The Chromium OS Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""build_packages updates the set of binary packages needed by Chrome OS.
+
+The build_packages process cross compiles all packages that have been
+updated into the given sysroot and builds binary packages as a side-effect.
+The output packages will be used by the build_image script to create a
+bootable Chrome OS image.
+"""
+
+import os
+
+from chromite.lib import constants
+from chromite.lib import cros_build_lib
+
+
+def main(argv):
+  cmd = [
+      'bash',
+      os.path.join(constants.CROSUTILS_DIR, 'build_packages.sh'),
+      '--script-is-run-only-by-chromite-and-not-users'
+  ]
+  cmd.extend(argv)
+  try:
+    cros_build_lib.run(cmd)
+  except cros_build_lib.RunCommandError as e:
+    cros_build_lib.Die(e)