Commit e2a0d1ff authored by Vijayaditya Peddinti's avatar Vijayaditya Peddinti
Browse files

trunk/tools/extras : modified to check for Python.h

git-svn-id: 5e6a8d80-dfce-4ca6-a32a-6e07a63d50c8
parent 15c5c3fd
......@@ -13,6 +13,31 @@ fi
echo "You must call this script from the tools/ directory" && exit 1;
# Install python-devel package if not already available
# first, makes sure distutils.sysconfig usable
if ! $(python -c "import distutils.sysconfig" &> /dev/null); then
echo "$0: WARNING: python library distutils.sysconfig not usable, this is necessary to figure out the path of Python.h." >&2
echo "Proceeding with installation." >&2
# get include path for this python version
INCLUDE_PY=$(python -c "from distutils import sysconfig as s; print s.get_config_vars()['INCLUDEPY']")
if [ ! -f "${INCLUDE_PY}/Python.h" ]; then
echo "$0 : ERROR: python-devel/python-dev not installed" >&2
if which yum >&/dev/null; then
# this is a red-hat system
echo "$0: we recommend that you run (our best guess):"
echo " sudo yum install python-devel"
if which apt-get >&/dev/null; then
# this is a debian system
echo "$0: we recommend that you run (our best guess):"
echo " sudo apt-get install python-dev"
exit 1
[ ! -f $g2p_archive ] && wget$g2p_archive
tar xzf $g2p_archive
mv g2p sequitur
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment