diff options
author | Duy Truong <duytruong@google.com> | 2023-10-27 11:35:34 -0700 |
---|---|---|
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-11-29 11:50:53 +0000 |
commit | 9f0ef5d926b29cabf8509be1b777c24c192c5e21 (patch) | |
tree | 353b9087b08273a18f0dc73ffc860bc33e29cde8 /subcmds/help.py | |
parent | c287428b37c485edeaefbbfb1b99ceb20cc303f6 (diff) | |
download | git-repo-9f0ef5d926b29cabf8509be1b777c24c192c5e21.tar.gz |
repo: add repo main script's directory to PYTHONPATH.
Python 3.11 introduces PYTHONSAFEPATH and the -P flag which, if enabled,
does not prepend the script's directory to sys.path by default.
This breaks repo because main.py expects its own directory to be part of
Python's import path.
This causes problems with tools that add PYTHONSAFEPATH to python
programs, most notably Bazel.
We will simply prepend main.py's path to PYTHONPATH instead.
Bug: 307767740
Change-Id: I94f3fda50213e450df0d1e2df6a0b8b597416973
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/391236
Tested-by: Duy Truong <duytruong@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Reviewed-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'subcmds/help.py')
0 files changed, 0 insertions, 0 deletions