Disable wrappers as Python version is controlled by FLAVORS --- README.md.orig 2021-11-19 21:23:13 UTC +++ README.md @@ -53,17 +53,6 @@ Setup: If you want to build git along the helper, you can run `make git`. -Python: -------- - -git-cinnabar will use one of `python3`, `python2.7` or `python2`, whichever has -mercurial libraries. If none of them does, it will use the first that can be -found. - -You may force a specific python through the `GIT_CINNABAR_PYTHON` environment -variable. - - Usage: ------ --- git-cinnabar.orig 2021-11-19 21:23:13 UTC +++ git-cinnabar @@ -1,21 +1,4 @@ -#!/bin/sh -''':' -py="$GIT_CINNABAR_PYTHON" -if test -z "$py"; then - for py in python3 python2.7 python2; do - "$py" -c "from mercurial import hg" >/dev/null 2>&1 && break - py= - done -fi -if test -z "$py"; then - for py in python3 python2.7 python2; do - command -v "$py" > /dev/null && break - py=python3 - done -fi -exec "$py" "$0" "$@" -exit 1 -''' +#!/usr/bin/env python import os import sys --- git-remote-hg.orig 2021-11-19 21:23:13 UTC +++ git-remote-hg @@ -1,21 +1,4 @@ -#!/bin/sh -''':' -py="$GIT_CINNABAR_PYTHON" -if test -z "$py"; then - for py in python3 python2.7 python2; do - "$py" -c "from mercurial import hg" >/dev/null 2>&1 && break - py= - done -fi -if test -z "$py"; then - for py in python3 python2.7 python2; do - command -v "$py" > /dev/null && break - py=python3 - done -fi -exec "$py" "$0" "$@" -exit 1 -''' +#!/usr/bin/env python from __future__ import division import os