This ensures the we’re calculating we’ve run `fix_dynamic_linkage` so
that their results are consistent with what we’re actually pouring.
Combined with the linkage cache (which will be enabled by default in
future) this has very little performance overhead for consistently
Correct tab results.
As a result, don’t bother looking at opportunistically linked
dependencies when creating a tab by default but only do so after
installation has completed.
Finally, only output the caveats and summary after all these
operations have completed.
Cache all the non-weak dynamic library links for a keg rather than the
result of running `brew linkage`. This means that we correctly handle
changes to e.g. what non-keg files are present on disk.
We need to manually specify these now so let's add a few that we'd
either previously documented or we've caught being used in the wild and
adjust the documentation accordingly.
When the line was switched to the more explicit
`virtualenv_create(libexec, "python3")` the package installed with any issues.
Arguably, I am not as comfortable as I would like with Homebrew's relationship with Python, so maybe this reveals a larger underlying issue or there was a mistake within the original Formula.
The formula is hosted [here](https://github.com/saulpw/homebrew-vd).
```
Last 15 lines from /Users/anja/Library/Logs/Homebrew/visidata/14.pip:
Removing source in /private/tmp/pip-req-build-CH6VRn
visidata requires Python '>=3.4' but the running Python is 2.7.10
Exception information:
Traceback (most recent call last):
File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/basecommand.py", line 228, in main
status = self.run(options, args)
File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 291, in run
resolver.resolve(requirement_set)
File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 103, in resolve
self._resolve_one(requirement_set, req)
File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/resolve.py", line 262, in _resolve_one
check_dist_requires_python(dist)
File "/usr/local/Cellar/visidata/1.2/libexec/lib/python2.7/site-packages/pip/_internal/utils/packaging.py", line 55, in check_dist_requires_python
'.'.join(map(str, sys.version_info[:3])),)
UnsupportedPythonVersion: visidata requires Python '>=3.4' but the running Python is 2.7.10
```
This was accounted for in Version::NULL.<=>, but not in Version#<=>,
so these could only be compared if Version::NULL was the left hand
side.
The check had to go above the check that `other` is a version because
`Version::NULL`'s anonymous class does not inherit from `Version`.
(The type check feels like it's probably a smell, but out of scope).