summaryrefslogtreecommitdiff
path: root/python/scripts
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2022-09-26 22:42:21 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2022-09-26 22:42:21 +0000
commit638ae72b3a6a7d89f5ba30d7ed1ff2d931c55dda (patch)
treef25f8e3a221db1d69f9658d3167bf6155ac57118 /python/scripts
parent42e4361765a626bfebe9b343d9b1d97789bf1303 (diff)
parenteb3a900c5c0917343400c34dd932af771ba725d1 (diff)
Merge "Add flag to not add directory of entrypoint to sys.path"
Diffstat (limited to 'python/scripts')
-rw-r--r--python/scripts/main_non_embedded.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/python/scripts/main_non_embedded.py b/python/scripts/main_non_embedded.py
new file mode 100644
index 000000000..ffbaaa8db
--- /dev/null
+++ b/python/scripts/main_non_embedded.py
@@ -0,0 +1,6 @@
+import runpy
+
+# The purpose of this file is to implement python 3.11+'s
+# PYTHON_SAFE_PATH / -P option on older python versions.
+
+runpy._run_module_as_main("ENTRY_POINT", alter_argv=False)