python: PYTHONHOME may not be the same as the prefix of the python executable (#2173)
python: PYTHONHOME may not be the same as the prefix of the python executable (#2173)

On MacOS, brew installs /usr/local/bin/python but the Python prefix is not /usr/local/bin
Use the python command sys.exec to get the correct directory, instead of the ad hoc self.prefix
previously used

This was a bear to debug; been driving me nuts since I started using spack.
Since spack passes PYTHONHOME down to package builds in the environment
it was passing PYTHONHOME of /usr/local/bin to the PETSc build that uses Python so
the PETSc Python ./configure errored immediately with

ImportError: No module named site

since python could find no python modules. Todd Gamblin pointed out that my first try to fix
this was wrong since it assumed the spack python was the same python used to run spack. Elizabeth Fischer
suggested how to get it to work also with python3

Funded-by: IDEAS
Project: IDEAS/xSDK
Time:  7 hours
Thanks-to: Todd Gamblin, Elizabeth Fischer
matthiasdiener/spack,mfherbst/spack,LLNL/spack,krafczyk/spack,EmreAtes/spack,krafczyk/spack,mfherbst/spack,krafczyk/spack,iulian787/spack,TheTimmy/spack,EmreAtes/spack,tmerrick1/spack,EmreAtes/spack,lgarren/spack,skosukhin/spack,matthiasdiener/spack,matthiasdiener/spack,TheTimmy/spack,lgarren/spack,EmreAtes/spack,iulian787/spack,skosukhin/spack,EmreAtes/spack,skosukhin/spack,skosukhin/spack,lgarren/spack,mfherbst/spack,tmerrick1/spack,lgarren/spack,mfherbst/spack,skosukhin/spack,matthiasdiener/spack,TheTimmy/spack,krafczyk/spack,TheTimmy/spack,tmerrick1/spack,LLNL/spack,mfherbst/spack,iulian787/spack,LLNL/spack,matthiasdiener/spack,LLNL/spack,tmerrick1/spack,lgarren/spack,LLNL/spack,TheTimmy/spack,iulian787/spack,iulian787/spack,krafczyk/spack,tmerrick1/spack