radare2/swig/python-config-wrapper

33 lines
564 B
Bash
Executable File

#!/bin/sh
# python-config wrapper trying to fix the python versioning hell
# -- pancake
# order matters here
PCS=" python2-config
python25-config
python2.5-config
python26-config
python2.6-config
python27-config
python2.7-config
python28-config
python2.8-config
python-config"
PYTHONCONFIG=""
for a in ${PCS} ; do
$a --help 2>/dev/null
if [ $? = 0 ]; then
PYTHONCONFIG=$a
break
fi
done
[ -z "${PYTHONCONFIG}" ] && exit 1
if [ "$1" = "-n" ]; then
echo ${PYTHONCONFIG}
exit 0
fi
${PYTHONCONFIG} $@ | sed -e s,-Wstrict-prototypes,,g 2>/dev/null