Ok.  I made these changes.  The code now looks like this:         # openmpi         if '+openmpi' in spec:             MPIOptions.append(['-DOPENMPI_DIR=%s' % spec['openmpi'].prefix])         # mpich         if '+mpich' in spec:             MPIOptions.append(['-DMPICH_DIR=%s' % spec['mpich'].prefix])         # mpich2         if '+mpich2' in spec:             MPIOptions.append(['-DMPICH2_DIR=%s' % spec['mpich2'].prefix]) ... ... 