[Checkins] SVN: zc.buildout/branches/gary-5/ settle on "include-site-packages" and migrate all variations of "add-site-packages" to that spelling.

Gary Poster gary.poster at canonical.com
Mon Feb 22 18:13:01 EST 2010


Log message for revision 109334:
  settle on "include-site-packages" and migrate all variations of "add-site-packages" to that spelling.

Changed:
  U   zc.buildout/branches/gary-5/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/gary-5/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/gary-5/src/zc/buildout/tests.py
  U   zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
  U   zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/scripts.py
  U   zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py

-=-
Modified: zc.buildout/branches/gary-5/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/gary-5/src/zc/buildout/easy_install.py	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/src/zc/buildout/easy_install.py	2010-02-22 23:13:01 UTC (rev 109334)
@@ -1170,7 +1170,7 @@
 def sitepackage_safe_scripts(
     dest, working_set, executable, site_py_dest,
     reqs=(), scripts=None, interpreter=None, extra_paths=(),
-    initialization='', add_site_packages=False, exec_sitecustomize=False,
+    initialization='', include_site_packages=False, exec_sitecustomize=False,
     relative_paths=False, script_arguments='', script_initialization=''):
     """Generate scripts and/or an interpreter from a system Python.
 
@@ -1184,7 +1184,7 @@
         site_py_dest, executable, initialization, exec_sitecustomize))
     generated.append(_generate_site(
         site_py_dest, working_set, executable, extra_paths,
-        add_site_packages, relative_paths))
+        include_site_packages, relative_paths))
     script_initialization = (
         '\nimport site # imports custom buildout-generated site.py\n%s' % (
             script_initialization,))
@@ -1521,10 +1521,10 @@
     return sitecustomize_path
 
 def _generate_site(dest, working_set, executable, extra_paths=(),
-                   add_site_packages=False, relative_paths=False):
+                   include_site_packages=False, relative_paths=False):
     """Write a site.py file with eggs from working_set.
 
-    extra_paths will be added to the path.  If add_site_packages is True,
+    extra_paths will be added to the path.  If include_site_packages is True,
     paths from the underlying Python will be added.
     """
     path = _get_path(working_set, extra_paths)
@@ -1536,7 +1536,7 @@
             [(line and '    %s' % (line,) or line)
              for line in preamble.split('\n')])
     original_path_setup = ''
-    if add_site_packages:
+    if include_site_packages:
         stdlib, site_paths = _get_system_paths(executable)
         original_path_setup = original_path_snippet % (
             _format_paths((repr(p) for p in site_paths), 2),)
@@ -1551,7 +1551,7 @@
                     relative_paths)
             else:
                 location = repr(distribution.location)
-            preamble += namespace_add_site_packages_setup % (location,)
+            preamble += namespace_include_site_packages_setup % (location,)
             original_path_setup = (
                 addsitedir_namespace_originalpackages_snippet +
                 original_path_setup)
@@ -1580,7 +1580,7 @@
         raise RuntimeError('Buildout did not successfully rewrite site.py')
     return site_path
 
-namespace_add_site_packages_setup = '''
+namespace_include_site_packages_setup = '''
     setuptools_path = %s
     sys.path.append(setuptools_path)
     known_paths.add(os.path.normcase(setuptools_path))

Modified: zc.buildout/branches/gary-5/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/gary-5/src/zc/buildout/easy_install.txt	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/src/zc/buildout/easy_install.txt	2010-02-22 23:13:01 UTC (rev 109334)
@@ -1267,7 +1267,7 @@
     >>> reset_interpreter()
     >>> generated = zc.buildout.easy_install.sitepackage_safe_scripts(
     ...     interpreter_bin_dir, ws, sys.executable, interpreter_parts_dir,
-    ...     interpreter='py', add_site_packages=True)
+    ...     interpreter='py', include_site_packages=True)
     >>> sys.stdout.write('#\n'); cat(site_path)
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     #...
@@ -1336,7 +1336,7 @@
     ...     links=[link_server, namespace_eggs], index=link_server+'index/')
     >>> generated = zc.buildout.easy_install.sitepackage_safe_scripts(
     ...     interpreter_bin_dir, ws, sys.executable, interpreter_parts_dir,
-    ...     interpreter='py', add_site_packages=True)
+    ...     interpreter='py', include_site_packages=True)
     >>> sys.stdout.write('#\n'); cat(site_path)
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     #...
@@ -1394,7 +1394,7 @@
     >>> reset_interpreter()
     >>> generated = zc.buildout.easy_install.sitepackage_safe_scripts(
     ...     interpreter_bin_dir, ws, sys.executable, interpreter_parts_dir,
-    ...     interpreter='py', add_site_packages=True,
+    ...     interpreter='py', include_site_packages=True,
     ...     relative_paths=interpreter_dir)
     >>> sys.stdout.write('#\n'); cat(site_path)
     ... # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE

Modified: zc.buildout/branches/gary-5/src/zc/buildout/tests.py
===================================================================
--- zc.buildout/branches/gary-5/src/zc/buildout/tests.py	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/src/zc/buildout/tests.py	2010-02-22 23:13:01 UTC (rev 109334)
@@ -1912,7 +1912,7 @@
     ... recipe = z3c.recipe.scripts
     ... python = primed_python
     ... interpreter = py
-    ... add-site-packages = true
+    ... include-site-packages = true
     ... eggs = tellmy.version == 1.0
     ...        tellmy.fortune == 1.0
     ...        demo
@@ -1937,7 +1937,7 @@
     Generated interpreter '/sample-buildout/bin/py'.
     <BLANKLINE>
 
-Finally, we are ready for the actual test.  Prior to the bug fix that
+Finally, we are ready to see if it worked.  Prior to the bug fix that
 this tests, the results of both calls below was the following::
 
     1.1

Modified: zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt
===================================================================
--- zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/README.txt	2010-02-22 23:13:01 UTC (rev 109334)
@@ -33,7 +33,7 @@
 In addition to these, the recipe offers these new options.  They are
 introduced here, and described more in depth below.
 
-add-site-packages
+include-site-packages
     You can choose to have the site-packages of the underlying Python
     available to your script or interpreter, in addition to the packages
     from your eggs.  See the section on this option for motivations and
@@ -47,7 +47,7 @@
 exec-sitecustomize
     Normally the Python's real sitecustomize module is not processed.
     If you want it to be processed, set this value to 'true'.  This will
-    be honored irrespective of the setting for add-site-packages.
+    be honored irrespective of the setting for include-site-packages.
 
 script-initialization
     The standard initialization code affects both an interpreter and scripts.
@@ -202,7 +202,7 @@
 possibilities.  Don't be unaware of the dangers.
 
 To show off these features, we need to use buildout with a Python
-executable with some extra paths to show ``add-site-packages``; and one
+executable with some extra paths to show ``include-site-packages``; and one
 guaranteed to have a sitecustomize module to show
 ``exec-sitecustomize``.  We'll make one using a test fixture called
 ``make_py``. The os.environ change below will go into the sitecustomize,
@@ -215,7 +215,7 @@
     >>> print site_packages_path
     /executable_buildout/site-packages
 
-Now let's take a look at add-site-packages.
+Now let's take a look at include-site-packages.
 
     >>> write(sample_buildout, 'buildout.cfg',
     ... """
@@ -225,7 +225,7 @@
     ...
     ... [py]
     ... recipe = z3c.recipe.scripts:interpreter
-    ... add-site-packages = true
+    ... include-site-packages = true
     ... eggs = demo<0.3
     ... find-links = %(server)s
     ... index = %(server)s/index

Modified: zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/scripts.py
===================================================================
--- zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/scripts.py	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/scripts.py	2010-02-22 23:13:01 UTC (rev 109334)
@@ -31,13 +31,13 @@
             b_options['parts-directory'], self.name)
 
         value = options.setdefault(
-            'add-site-packages',
-            b_options.get('add-site-packages', 'false'))
+            'include-site-packages',
+            b_options.get('include-site-packages', 'false'))
         if value not in ('true', 'false'):
             raise zc.buildout.UserError(
-                "Invalid value for add-site-packages option: %s" %
+                "Invalid value for include-site-packages option: %s" %
                 (value,))
-        self.add_site_packages = (value == 'true')
+        self.include_site_packages = (value == 'true')
 
         value = options.setdefault(
             'exec-sitecustomize',
@@ -69,7 +69,7 @@
             interpreter=options['name'],
             extra_paths=self.extra_paths,
             initialization=options.get('initialization', ''),
-            add_site_packages=self.add_site_packages,
+            include_site_packages=self.include_site_packages,
             exec_sitecustomize=self.exec_sitecustomize,
             relative_paths=self._relative_paths,
             ))
@@ -92,7 +92,7 @@
             interpreter=options.get('interpreter'),
             extra_paths=self.extra_paths,
             initialization=options.get('initialization', ''),
-            add_site_packages=self.add_site_packages,
+            include_site_packages=self.include_site_packages,
             exec_sitecustomize=self.exec_sitecustomize,
             relative_paths=self._relative_paths,
             script_arguments=options.get('arguments', ''),

Modified: zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py
===================================================================
--- zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-02-22 23:12:54 UTC (rev 109333)
+++ zc.buildout/branches/gary-5/z3c.recipe.scripts_/src/z3c/recipe/scripts/tests.py	2010-02-22 23:13:01 UTC (rev 109334)
@@ -25,7 +25,7 @@
 # all of the examples.  The README tests ``extends``,
 # ``include-site-customization`` and ``name``.  That leaves ``python``,
 # ``extra-paths``, ``initialization``, ``relative-paths``, and
-# ``add-site-packages``.
+# ``include-site-packages``.
 
 def supports_python_option():
     """



More information about the checkins mailing list