Merge pull request #3572 from DomT4/python

python: handle env filtering on pth check
This commit is contained in:
Mike McQuaid 2017-12-13 08:49:52 +00:00 committed by GitHub
commit 7352c90796
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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