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