python: handle env filtering on pth check
Since ENV filtering became the default this has been chucking
erroneous warnings from both `brew doctor` and things like `brew install pygobject`
about needing to run:
```
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/xyz/Library/Python/2.7/lib/python/site-packages/homebrew.pth
```
even though I had Homebrew's `python` installed.
This commit is contained in:
parent
7b558e0522
commit
d6ebdf1e62
@ -35,7 +35,7 @@ module Language
|
||||
probe_file = homebrew_site_packages(version)/"homebrew-pth-probe.pth"
|
||||
begin
|
||||
probe_file.atomic_write("import site; site.homebrew_was_here = True")
|
||||
quiet_system python, "-c", "import site; assert(site.homebrew_was_here)"
|
||||
with_homebrew_path { quiet_system python, "-c", "import site; assert(site.homebrew_was_here)" }
|
||||
ensure
|
||||
probe_file.unlink if probe_file.exist?
|
||||
end
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user