git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [filter-repo PATCH] filter-repo: help with local install

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 9, 2021, 17:24 UTC
Message-ID
<xmqqk0lz764u.fsf@gitster.g>
In-Reply-To
<e3d6c6d670b46d4f0dc133e83c6feede4d55c412.1625844149.git.git@grubix.eu>
Michael J Gruber <git@grubix.eu> writes:
Show 36 quoted lines
> The Makefile suggests a local install and works almost as is, except for
> the python path. Make it work automatically for this typical use case,
> and give a corresponding hint in INSTALL.md.
>
> Signed-off-by: Michael J Gruber <git@grubix.eu>
> ---
>  INSTALL.md | 5 +++--
>  Makefile   | 2 +-
>  2 files changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/INSTALL.md b/INSTALL.md
> index 00aabb7..d479681 100644
> --- a/INSTALL.md
> +++ b/INSTALL.md
> @@ -75,8 +75,9 @@ filter-repo only consists of a few files that need to be installed:
>      You can create this symlink to (or copy of) git-filter-repo named
>      git_filter-repo.py and place it in your python site packages; `python
>      -c "import site; print(site.getsitepackages())"` may help you find the
> -    appropriate location for your system.  Alternatively, you can place
> -    this file anywhere within $PYTHONPATH.
> +    appropriate location for your system, `python -c "import site;
> +    print(site.getusersitepackages())"` for a local install. Alternatively,
> +    you can place this file anywhere within $PYTHONPATH.
>  
>    * git-filter-repo.1
>  
> diff --git a/Makefile b/Makefile
> index 31f5e3a..c97d1f6 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -4,7 +4,7 @@ bindir = $(prefix)/libexec/git-core
>  localedir = $(prefix)/share/locale
>  mandir = $(prefix)/share/man
>  htmldir = $(prefix)/share/doc/git-doc
> -pythondir = $(prefix)/lib64/python3.6/site-packages
> +pythondir = $(shell python -c "import site; print(site.getusersitepackages())")

There may be no "python" on $PATH, yet the user may have told the make via PYTHON_PATH that /usr/bin/python3 is to be used.

Previous: Elijah NewrenNext: Elijah Newren
Message 3 of 4 in “filter-repo: help with local install”
  1. filter-repo: help with local installMichael J Gruber, Jul 9, 2021
  2. Elijah NewrenJul 9, 2021
  3. Junio C HamanoJul 9, 2021
  4. Elijah NewrenJul 9, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.