[mod_python] Issue in configure for mod_python 3.5.0
Eric Engle
eric.engle at mac.com
Sat Mar 1 05:27:59 UTC 2014
To all mod_python users,
It seems that there is a dependency on git for the mod_python install to work correctly. In the install package, in dist/, there is a shell script version.sh. In the script, a git --always command is issued. See below:
#!/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
If git is not installed on your system (maybe it should, but current install docs do not state it is a dependency), then version.sh will inserted junk into a variable version in version.py that is generated as a result of make.
A check in the script for git would be very helpful down the road.
#!/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`
if git —version &>/dev/null; then
echo $MAJ.$MIN.$PCH-$GIT
else
echo $MAJ.$MIN.$PCH
fi
Once I corrected the version number string in version.py, mod_python is working as expected.
Thanks,
Eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.modpython.org/pipermail/mod_python/attachments/20140301/6bb0e834/attachment.html>
More information about the mod_python
mailing list