Merge branch 'sr/remote-helper-export' into next

* sr/remote-helper-export:
  Makefile: Simplify handling of python scripts

Conflicts:
	Makefile
This commit is contained in:
Junio C Hamano
2010-04-09 22:45:56 -07:00
2 changed files with 4 additions and 7 deletions

View File

@@ -1629,13 +1629,8 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \
--no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \
instlibdir` && \
sed -e '1{' \
-e ' s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
-e '}' \
-e 's|^import sys.*|&; \\\
import os; \\\
sys.path.insert(0, os.getenv("GITPYTHONLIB",\
"@@INSTLIBDIR@@"));|' \
sed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \
-e 's|\(os\.getenv("GITPYTHONLIB"\)[^)]*)|\1,"@@INSTLIBDIR@@")|' \
-e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
$@.py >$@+ && \
chmod +x $@+ && \

View File

@@ -2,6 +2,8 @@
import hashlib
import sys
import os
sys.path.insert(0, os.getenv("GITPYTHONLIB","."))
from git_remote_helpers.util import die, debug, warn
from git_remote_helpers.git.repo import GitRepo