commit | 9f0ef5d926b29cabf8509be1b777c24c192c5e21 | [log] [tgz] |
---|---|---|
author | Duy Truong <duytruong@google.com> | Fri Oct 27 11:35:34 2023 -0700 |
committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Nov 29 11:50:53 2023 +0000 |
tree | 353b9087b08273a18f0dc73ffc860bc33e29cde8 | |
parent | c287428b37c485edeaefbbfb1b99ceb20cc303f6 [diff] |
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>
Repo is a tool built on top of Git. Repo helps manage many Git repositories, does the uploads to revision control systems, and automates parts of the development workflow. Repo is not meant to replace Git, only to make it easier to work with Git. The repo command is an executable Python script that you can put anywhere in your path.
Please use the repo-discuss mailing list or issue tracker for questions.
You can file a new bug report under the “repo” component.
Please do not e-mail individual developers for support. They do not have the bandwidth for it, and often times questions have already been asked on repo-discuss or bugs posted to the issue tracker. So please search those sites first.
Many distros include repo, so you might be able to install from there.
# Debian/Ubuntu. $ sudo apt-get install repo # Gentoo. $ sudo emerge dev-vcs/repo
You can install it manually as well as it's a single script.
$ mkdir -p ~/.bin $ PATH="${HOME}/.bin:${PATH}" $ curl https://storage.googleapis.com/git-repo-downloads/repo > ~/.bin/repo $ chmod a+rx ~/.bin/repo