Merge branch 'da/maint-python-startup' into maint
[gitweb.git] / Makefile
index e57d9754e28f280cb3074094c800c97dbdb91d12..5b868066060de7e2e892f911bc47d78afe43fc1d 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1560,9 +1560,8 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py
            -e '}' \
            -e 's|^import sys.*|&; \\\
                   import os; \\\
-                  sys.path[0] = os.environ.has_key("GITPYTHONLIB") and \\\
-                                os.environ["GITPYTHONLIB"] or \\\
-                                "@@INSTLIBDIR@@"|' \
+                  sys.path.insert(0, os.getenv("GITPYTHONLIB",\
+                                               "@@INSTLIBDIR@@"));|' \
            -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
            $@.py >$@+ && \
        chmod +x $@+ && \