]> granicus.if.org Git - python/commitdiff
Fix issue #4865: add /Library/Python/2.7/site-packages to
authorRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 23:10:35 +0000 (23:10 +0000)
committerRonald Oussoren <ronaldoussoren@mac.com>
Mon, 30 Mar 2009 23:10:35 +0000 (23:10 +0000)
sys.path on OSX, to make it easier to share (some) installed
packages between the system install and a user install.

Lib/site.py
Misc/NEWS

index 21c7db24dbe25bd305c18d1683caa1eae0c46671..abe668759cd4ad37e5745247c6a0ce5d2c459535 100644 (file)
@@ -275,13 +275,15 @@ def addsitepackages(known_paths):
 
         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
+            # locations.
             if 'Python.framework' in prefix:
                 sitedirs.append(
                     os.path.expanduser(
                         os.path.join("~", "Library", "Python",
                                      sys.version[:3], "site-packages")))
+                sitedirs.append(
+                        os.path.join("/Library", "Python",
+                            sys.version[:3], "site-packages"))
 
     for sitedir in sitedirs:
         if os.path.isdir(sitedir):
index 1de245895696da3ea3b8b597037da8ed4168b8b4..b0ae319c54ce095765ffa632b2a9fa3c18902dfb 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -1,5 +1,4 @@
-+++++++++++
-Python News
++++++++++++ Python News
 +++++++++++
 
 (editors: check NEWS.help for information about editing NEWS using ReST.)
@@ -12,6 +11,9 @@ What's New in Python 2.7 alpha 1
 Core and Builtins
 -----------------
 
+- Issue #4865: On MacOSX /Library/Python/2.7/site-packages is added to
+  the end sys.path, for compatibility with the system install of Python.
+
 - Issue #4688: Add a heuristic so that tuples and dicts containing only
   untrackable objects are not tracked by the garbage collector. This can
   reduce the size of collections and therefore the garbage collection overhead