title: Check for existence of Python dev files from bash script
body: <p>I am creating a simple bash script to download and install a python Nagios plugin. On some older servers the script may need to install the subprocess module and as a result I need to make sure the correct python-devel files are installed.</p>
  
  <p>What is an appropriate and cross platform method of checking for these files. Would like to stay away from rpm or apt.</p>
  
  <p>If you can tell me how to do the check from within python that would work. Thanks!</p>
  
  <p>Update:</p>
  
  <p>This is the best I have come up with. Anyone know a better or more conclusive method?</p>
  
  <pre><code>if [ ! -e $(python -c 'from distutils.sysconfig import get_makefile_filename as m; print m()') ]; then echo "Sorry"; fi
  </code></pre>