Explain how to use a python3 executable not named "python3"

Signed-off-by: Elijah Newren <newren@gmail.com>
pull/43/head
Elijah Newren 5 years ago
parent 5c35bb7a8d
commit 1762b99573

@ -5,6 +5,11 @@ filter-repo only consists of a few files that need to be installed:
This can be installed in the directory pointed to by `git --exec-path`,
or placed anywhere in $PATH. This is the only thing needed for basic use.
If your python3 executable is named "python" instead of "python3"
(this particularly appears to affect a number of Windows users),
then you'll also need to modify the first line of git-filter-repo
to replace "python3" with "python".
* git_filter_repo.py
If you want to make use of one of the scripts in contrib/filter-repo-demos/,
@ -28,3 +33,7 @@ that prefer it. However, usage of the Makefile really requires overridding
at least a couple of the directories with sane values, e.g.
$ make prefix=/usr pythondir=/usr/lib64/python3.8/site-packages install
Also, the Makefile will not edit the shebang line (the first line) of
git-filter-repo if your python executable is not named "python3";
you'll still need to do that yourself.

@ -46,6 +46,7 @@ installation for basic use trivial: just copy it into your $PATH.
See [INSTALL](INSTALL) for things beyond basic usage or special cases.
The more involved instructions are needed if you
* are working with a python3 executable named something other than "python3"
* want to install documentation
* want to run some of the [contrib](contrib/filter-repo-demos/) examples
* want to create your own python filtering scripts using filter-repo as a

@ -1584,6 +1584,8 @@ class GitUtils(object):
contents = f.read()
# If people replaced @@LOCALEDIR@@ string to point at their local
# directory, undo it so we can get original source version.
contents = re.sub(br'^#\!/usr/bin/env python.*',
br'#!/usr/bin/env python3', contents)
contents = re.sub(br'(\("GIT_TEXTDOMAINDIR"\) or ").*"',
br'\1@@LOCALEDIR@@"', contents)

Loading…
Cancel
Save