python_requirement: fix ENV for python3
Closes Homebrew/homebrew#43453.
This commit is contained in:
parent
01d7f4e766
commit
370df177c4
@ -24,9 +24,7 @@ class PythonRequirement < Requirement
|
||||
ENV.prepend_path "PATH", Formula["python"].opt_bin
|
||||
end
|
||||
|
||||
if python_binary == "python"
|
||||
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"
|
||||
end
|
||||
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{short_version}/site-packages"
|
||||
end
|
||||
|
||||
def python_short_version
|
||||
@ -62,6 +60,10 @@ class Python3Requirement < PythonRequirement
|
||||
|
||||
satisfy(:build_env => false) { which_python }
|
||||
|
||||
env do
|
||||
ENV["PYTHONPATH"] = "#{HOMEBREW_PREFIX}/lib/python#{python_short_version}/site-packages"
|
||||
end
|
||||
|
||||
def python_binary
|
||||
"python3"
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user