gitmod-python

fatal: Not a git repository when installing mod_python


I'm trying to install mod_python but I got an error:

SyntaxError: ('EOL while scanning string literal', ('/usr/local/lib/python2.7/dist-packages/mod_python/version.py', 3, 79, 'version = "fatal: Not a git repository (or any of the parent directories): .git\n'))

This is the version.sh file used in mod_python.

#!/bin/sh

MPV_PATH="`dirname $0`/../src/include/mp_version.h"

MAJ=`awk '/MP_VERSION_MAJOR/ {print $3}' $MPV_PATH`
MIN=`awk '/MP_VERSION_MINOR/ {print $3}' $MPV_PATH`
PCH=`awk '/MP_VERSION_PATCH/ {print $3}' $MPV_PATH`
GIT=`git describe --always`

echo $MAJ.$MIN.$PCH-$GIT

I run it manually then I got:

fatal: Not a git repository (or any of the parent directories): .git
3.4.1-

What does this mean? Pleas help!!

Thanks!


Solution

  • The version.sh file assumes you are installing from git. That seems like a bug.

    To fix it, you can remove the line

    GIT=`git describe --always`
    

    and change the next line to

    echo $MAJ.$MIN.$PCH