python3: bring sitecustomize in sync with python2
parent
abfa12157f
commit
4fd6096df2
|
@ -224,7 +224,7 @@ class Python3 < Formula
|
||||||
' You should `unset PYTHONPATH` to fix this.')
|
' You should `unset PYTHONPATH` to fix this.')
|
||||||
else:
|
else:
|
||||||
# Only do this for a brewed python:
|
# Only do this for a brewed python:
|
||||||
opt_executable = '#{HOMEBREW_PREFIX}/opt/python3/bin/python#{VER}'
|
opt_executable = '#{opt_bin}/python#{VER}'
|
||||||
if os.path.realpath(sys.executable) == os.path.realpath(opt_executable):
|
if os.path.realpath(sys.executable) == os.path.realpath(opt_executable):
|
||||||
# Remove /System site-packages, and the Cellar site-packages
|
# Remove /System site-packages, and the Cellar site-packages
|
||||||
# which we moved to lib/pythonX.Y/site-packages. Further, remove
|
# which we moved to lib/pythonX.Y/site-packages. Further, remove
|
||||||
|
@ -241,7 +241,7 @@ class Python3 < Formula
|
||||||
# Assume Framework style build (default since months in brew)
|
# Assume Framework style build (default since months in brew)
|
||||||
try:
|
try:
|
||||||
from _sysconfigdata import build_time_vars
|
from _sysconfigdata import build_time_vars
|
||||||
build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{HOMEBREW_PREFIX}/opt/python3/Frameworks/Python.framework/Versions/#{VER}/Python'
|
build_time_vars['LINKFORSHARED'] = '-u _PyMac_Error #{opt_prefix}/Frameworks/Python.framework/Versions/#{VER}/Python'
|
||||||
except:
|
except:
|
||||||
pass # remember: don't print here. Better to fail silently.
|
pass # remember: don't print here. Better to fail silently.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue