#!/bin/sh _psep(){ echo echo "====== $@ ======" } _psep "$0 $(date -j "+%F %H:%M")" _psep "uname -a" uname -a _psep "grep version" grep --version | head -n 1 _psep "python build options" # based on http://pymotw.com/2/sysconfig/ cat > /tmp/pysyscfg << _EOF import sysconfig config_values = sysconfig.get_config_vars() print ' === CONFIG_ARGS ===' print ' CONFIG_ARGS={CONFIG_ARGS}'.format(**config_values) print ' === PTH ===' print ' HAVE_PTH={HAVE_PTH}'.format(**config_values) _EOF python /tmp/pysyscfg _psep "lookup HAVE_PTH in include/python2.7/Python.h" grep HAVE_PTH /usr/local/include/python2.7/Python.h _psep "check include/pth/pth.h" if [ -s /usr/local/include/pth/pth.h ]; then echo "=> OK found: include/pth/pth.h" else echo "=> not found" fi _psep "check if pth is installed" if [ -x /usr/local/sbin/pkg -a -s /var/db/pkg/local.sqlite ]; then echo " => pkgng in use" if [ $(pkg info -qoa | grep devel/pth) ]; then pkg check -sxv devel/pth else echo " => devel/pth not installed" fi else echo " => old pkg tools in use" if [ $(pkg_info -qoa | grep devel/pth) ]; then pkg_info -gx pth else echo " => devel/pth not installed" fi fi