[Checkins] SVN: zc.buildout/branches/gary-1.5.2/ improve the BUILDOUT_ORIGINAL_PYTHONPATH changes and add/update docs.

Gary Poster gary.poster at canonical.com
Fri Sep 3 16:18:59 EDT 2010


Log message for revision 116196:
  improve the BUILDOUT_ORIGINAL_PYTHONPATH changes and add/update docs.

Changed:
  U   zc.buildout/branches/gary-1.5.2/CHANGES.txt
  U   zc.buildout/branches/gary-1.5.2/SYSTEM_PYTHON_HELP.txt
  U   zc.buildout/branches/gary-1.5.2/src/zc/buildout/bootstrap.txt
  U   zc.buildout/branches/gary-1.5.2/src/zc/buildout/buildout.txt
  U   zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.txt

-=-
Modified: zc.buildout/branches/gary-1.5.2/CHANGES.txt
===================================================================
--- zc.buildout/branches/gary-1.5.2/CHANGES.txt	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/CHANGES.txt	2010-09-03 20:18:59 UTC (rev 116196)
@@ -4,8 +4,23 @@
 1.5.2 (unreleased)
 ==================
 
-(no changes)
+- IMPORTANT: For better backwards compatibility with the pre-1.5 line,
+  this release has two big changes from 1.5.0 and 1.5.1.
 
+  - Buildout defaults to including site packages.
+
+  - Buildout loads recipes and extensions with the same constraints to
+    site-packages that it builds eggs, instead of never allowing access
+    to site-packages.
+
+  This means that the default configuration should better support
+  pre-existing use of system Python in recipes or builds.
+
+- To make it easier to detect the fact that buildout has set the PYTHONPATH,
+  BUILDOUT_ORIGINAL_PYTHONPATH is always set in the environment, even if
+  PYTHONPATH was not originally set.  BUILDOUT_ORIGINAL_PYTHONPATH will
+  be an empty string if PYTHONPATH was not set.
+
 1.5.1 (2010-08-29)
 ==================
 

Modified: zc.buildout/branches/gary-1.5.2/SYSTEM_PYTHON_HELP.txt
===================================================================
--- zc.buildout/branches/gary-1.5.2/SYSTEM_PYTHON_HELP.txt	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/SYSTEM_PYTHON_HELP.txt	2010-09-03 20:18:59 UTC (rev 116196)
@@ -44,8 +44,17 @@
    how to update a recipe.  Note that you should generally only need to
    update recipes that generate scripts.
 
+You can then use ``include-site-packages = false`` and
+``exec-sitecustomize = false`` buildout options to eliminate access to
+your Python's site packages and not execute its sitecustomize file, if
+it exists, respectively.
+
+Alternately, you can use the ``allowed-eggs-from-site-packages`` buildout
+option as a glob-aware whitelist of eggs that may come from site-packages.
+This value defaults to "*", accepting all eggs.
+
 It's important to note that recipes not upgraded for zc.buildout 1.5.0
-should continue to work--just not with a system Python.
+should continue to work--just without internal support for a system Python.
 
 Using a system Python is inherently fragile.  Using a clean,
 freshly-installed Python without customization in site-packages is more
@@ -58,7 +67,7 @@
 However, using a system Python can be very convenient, and the
 zc.buildout code for this feature has been tested by many users already.
 Moreover, it has automated tests to exercise the problems that have been
-encountered and fixed.
+encountered and fixed.  Many people rely on it.
 
 Recipes That Support a System Python
 ====================================
@@ -184,10 +193,9 @@
 The Scripts class in that file is the closest to what you might be used
 to from zc.recipe.egg.
 
-Important note for recipe authors: the code in recipes is *always run
-without access to the site-packages*.  This is irrespective of the
-``include-site-packages`` option discussed elsewhere, which controls the
-software being built, but not the environment in which Buildout itself runs.
+Important note for recipe authors: As of buildout 1.5.2, the code in
+recipes is *always run with the access to the site-packages as
+configured in the buildout section*.
 
 virtualenv
 ==========

Modified: zc.buildout/branches/gary-1.5.2/src/zc/buildout/bootstrap.txt
===================================================================
--- zc.buildout/branches/gary-1.5.2/src/zc/buildout/bootstrap.txt	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/src/zc/buildout/bootstrap.txt	2010-09-03 20:18:59 UTC (rev 116196)
@@ -65,8 +65,8 @@
     import os
     path = sys.path[0]
     if os.environ.get('PYTHONPATH'):
-        os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ['PYTHONPATH']
         path = os.pathsep.join([path, os.environ['PYTHONPATH']])
+    os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '')
     os.environ['PYTHONPATH'] = path
     import site # imports custom buildout-generated site.py
     <BLANKLINE>

Modified: zc.buildout/branches/gary-1.5.2/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/branches/gary-1.5.2/src/zc/buildout/buildout.txt	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/src/zc/buildout/buildout.txt	2010-09-03 20:18:59 UTC (rev 116196)
@@ -2478,8 +2478,8 @@
     import os
     path = sys.path[0]
     if os.environ.get('PYTHONPATH'):
-        os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ['PYTHONPATH']
         path = os.pathsep.join([path, os.environ['PYTHONPATH']])
+    os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '')
     os.environ['PYTHONPATH'] = path
     import site # imports custom buildout-generated site.py
     <BLANKLINE>

Modified: zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.py	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.py	2010-09-03 20:18:59 UTC (rev 116196)
@@ -1287,8 +1287,8 @@
 import os
 path = sys.path[0]
 if os.environ.get('PYTHONPATH'):
-    os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ['PYTHONPATH']
     path = os.pathsep.join([path, os.environ['PYTHONPATH']])
+os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '')
 os.environ['PYTHONPATH'] = path
 import site # imports custom buildout-generated site.py
 %(script_initialization)s'''

Modified: zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.txt	2010-09-03 17:27:44 UTC (rev 116195)
+++ zc.buildout/branches/gary-1.5.2/src/zc/buildout/easy_install.txt	2010-09-03 20:18:59 UTC (rev 116196)
@@ -1510,8 +1510,8 @@
     import os
     path = sys.path[0]
     if os.environ.get('PYTHONPATH'):
-        os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ['PYTHONPATH']
         path = os.pathsep.join([path, os.environ['PYTHONPATH']])
+    os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '')
     os.environ['PYTHONPATH'] = path
     import site # imports custom buildout-generated site.py
     <BLANKLINE>
@@ -1555,8 +1555,8 @@
     import os
     path = sys.path[0]
     if os.environ.get('PYTHONPATH'):
-        os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ['PYTHONPATH']
         path = os.pathsep.join([path, os.environ['PYTHONPATH']])
+    os.environ['BUILDOUT_ORIGINAL_PYTHONPATH'] = os.environ.get('PYTHONPATH', '')
     os.environ['PYTHONPATH'] = path
     import site # imports custom buildout-generated site.py
     import os



More information about the checkins mailing list