Up to now a brewed Python, even if not linked, was preferred over
and external Python, so that you had to completely `brew rm python`
to have a formula link against external (mostly system) Python.
From now on it is okay to `brew unlink python`.
Now, we can finally stop stuggesting to
`brew rm <foo>` and then `brew install <foo> <with-your-preferred options>
So `brew reinstall` will honor all options that have been recorded
into the INSTALL_RECEIPT.json plus if `--build-bottle` was used.
If the `src` in the Cellar of a formula is a symlink to another dir
in the same Cellar (for example `Frameworks/QtGui.framework` is a
symlink to `lib/QtGui.framework`), then we should make a symlink
directly instead of possibly creating an empty dir.
This is needed because Ruby's `find` does not follow symlinks (newer
versions can, but we have to support 10.8 for a long time).
Currently this probably only occurs for Qt, where we put symlinks
into the Cellar/Frameworks and the frameworks linking code is a bit
special to create a directory to "merge" together different versions
of the same framework from different formulae. See `python` and
`python3`; both install `Python.framework` and only one can be the
`Current` but the other should still be put into
`Python.framework/Versions`. Therefore `Python.framework` has to
be a dir and no symlink.
This rules out any possibility to test Python 3.x software as the
PYTHONPATH is used by any Python and `brew test pyqt --with-python3`
fails because it picks up the `pyqt` module fomr Python 2.x's
site-packages. Upstream tells us not to set the PYTHONPATH and then
starting another (major) python version.
In our sitecustomize.py we instruct python to exit with an error message
if the PYTHONPATH is pointing to a wrong homebrew site-packages dir.
With wrong meaning another major python version.
If you set the PYTHONPATH to include
$(brew --prefix)/lib/python2.7/site-packages
and start python3, it may pick up modules from there, wich can result
in errors for non pure python modules (such as PyQt).