Kaydet (Commit) be5d7079 authored tarafından Jack Jansen's avatar Jack Jansen

When on MacOSX, and only in a framework build, add

~/Library/Python/2.3/site-packages to sys.path, if it exists.
üst 36d49a90
......@@ -172,6 +172,19 @@ for prefix in prefixes:
os.path.join(prefix, "lib", "site-python")]
else:
sitedirs = [prefix, os.path.join(prefix, "lib", "site-packages")]
if sys.platform == 'darwin':
# for framework builds *only* we add the standard Apple
# locations. Currently only per-user, but /Library and
# /Network/Library could be added too
if 'Python.framework' in prefix:
home = os.environ['HOME']
if home:
sitedirs.append(
os.path.join(home,
'Library',
'Python',
sys.version[:3],
'site-packages'))
for sitedir in sitedirs:
if os.path.isdir(sitedir):
addsitedir(sitedir)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment