GHC 2017-08-05

8 comments.

, https://git.io/v7w6w in Homebrew/brew
Yeah, I was saying the ORIGINAL_PATHS fix should always work when Homebrew's python is installed, but could still break when there's no brewed python. (IMO It should still be implemented for consistency.) Checking each python* should work in all cases.

, https://git.io/v7wKm in Homebrew/brew
Sure. That's more reliable in a mixed dependency situation.

, https://git.io/v7wKY in Homebrew/brew
I meant what's the replacement for hard coded binary names?

, https://git.io/v7wKO in Homebrew/brew
> hard code the expectation of the binary name

Not sure how that works.

> disallow all mixed dependency trees

I would vote for that, but never put me in contact with all the people that would be frustrated by that change 😝 

, https://git.io/v7wK3 in Homebrew/brew
Oh never mind, I was confused.

, https://git.io/v7wKs in Homebrew/brew
How does ENV.delete("PYTHONPATH") fix the problem where python2 is selected when python3 is expected?

, https://git.io/v7wKG in Homebrew/brew
I should add that none of the proposals above would fix https://github.com/Homebrew/brew/issues/2958#issuecomment-318917264 for the same reason.

, https://git.io/v7wKZ in Homebrew/brew
My original proposal still stands, I believe.

> However, it seems that since we're doing
>
> ```
> # Homebrew Python should take precedence over other Pythons in the PATH
> ENV.prepend_path "PATH", Formula["python"].opt_bin
> ENV.prepend_path "PATH", Formula["python"].opt_libexec/"bin"
> ```
>
> we should really be putting those paths in front of ORIGINAL_PATHS when we do the which. This might be the source of inconsistency here.

I'll put together a patch tomorrow.

By the way, it won't fix https://github.com/Homebrew/brew/issues/2958#issuecomment-318917264, since that's rooted deeper in the dependency resolution chain.