[Checkins] SVN: zc.buildout/branches/gary-support-system-python/ revert the changes done by me evil twin to make PYTHONPATH be honored by scripts generated by zc.buildout. What a horrible idea he had for repeatability! I am embarrassed for him.

Gary Poster gary.poster at canonical.com
Wed Aug 12 16:17:49 EDT 2009


Log message for revision 102713:
  revert the changes done by me evil twin to make PYTHONPATH be honored by scripts generated by zc.buildout.  What a horrible idea he had for repeatability!  I am embarrassed for him.

Changed:
  U   zc.buildout/branches/gary-support-system-python/dev.py
  U   zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.txt
  U   zc.buildout/branches/gary-support-system-python/src/zc/buildout/update.txt
  U   zc.buildout/branches/gary-support-system-python/zc.recipe.egg_/src/zc/recipe/egg/README.txt

-=-
Modified: zc.buildout/branches/gary-support-system-python/dev.py
===================================================================
--- zc.buildout/branches/gary-support-system-python/dev.py	2009-08-12 15:52:19 UTC (rev 102712)
+++ zc.buildout/branches/gary-support-system-python/dev.py	2009-08-12 20:17:49 UTC (rev 102713)
@@ -47,8 +47,9 @@
 
 pkg_resources.working_set.add_entry('src')
 
-import zc.buildout.buildout
-zc.buildout.buildout.main(['bootstrap'])
+import zc.buildout.easy_install
+zc.buildout.easy_install.scripts(
+    ['zc.buildout'], pkg_resources.working_set , sys.executable, 'bin')
 
 bin_buildout = os.path.join('bin', 'buildout')
 

Modified: zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py	2009-08-12 15:52:19 UTC (rev 102712)
+++ zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.py	2009-08-12 20:17:49 UTC (rev 102713)
@@ -1260,9 +1260,8 @@
 script_template = script_header + '''\
 
 %(relative_paths_setup)s
-import sys, os
-pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-sys.path[:] = pythonpath + [
+import sys
+sys.path[:] = [
     %(path)s,
     ]
 %(initialization)s
@@ -1310,7 +1309,7 @@
 globs = globals().copy() # get a clean copy early
 
 %(relative_paths_setup)s
-import sys, os
+import sys
 
 _set_path = _interactive = True
 _force_interactive = False
@@ -1346,8 +1345,6 @@
     sys.path[:] = [
     %(path)s,
     ]
-pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-sys.path[0:0] = pythonpath
 sys.path.insert(0, '.')
 
 sys.argv[:] = _args

Modified: zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.txt	2009-08-12 15:52:19 UTC (rev 102712)
+++ zc.buildout/branches/gary-support-system-python/src/zc/buildout/easy_install.txt	2009-08-12 20:17:49 UTC (rev 102713)
@@ -650,9 +650,8 @@
     >>> cat(bin, 'demo') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-install/demo-0.3-py2.4.egg',
         '/sample-install/demoneeded-1.1-py2.4.egg',
         ...
@@ -690,9 +689,8 @@
     >>> cat(bin, 'demo') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-install/demo-0.3-py2.4.egg',
         '/sample-install/demoneeded-1.1-py2.4.egg',
         ...
@@ -737,7 +735,7 @@
     #!/usr/local/bin/python2.4
     globs = globals().copy() # get a clean copy early
     <BLANKLINE>
-    import sys, os
+    import sys
     <BLANKLINE>
     _set_path = _interactive = True
     _force_interactive = False
@@ -775,8 +773,6 @@
         '/sample-install/demoneeded-1.1-pyN.N.egg',
         ...
         ]
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[0:0] = pythonpath
     sys.path.insert(0, '.')
     <BLANKLINE>
     sys.argv[:] = _args
@@ -829,9 +825,8 @@
     >>> cat(bin, 'run') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
       '/sample-install/demo-0.3-py2.4.egg',
       '/sample-install/demoneeded-1.1-py2.4.egg',
       '/foo',
@@ -851,7 +846,7 @@
 precisely, those that are not included when Python is started with the -S
 argument--are loosely referred to as "site-packages" here.
 
-When generating scripts, paths that come from the site-packages are ordered
+When generating scripts, paths that come from the site-packages are ordered 
 after the other specific dependencies generated from the working set.  This
 is so that directories such as "site-packages" that can contain multiple
 dependencies come after the more specific distributions found by setuptools,
@@ -918,9 +913,8 @@
 
     >>> cat(bin, 'run') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
       '/sample-install/demo-0.3-py2.4.egg',
       '/sample-install/demoneeded-1.1-py2.4.egg',
       ...
@@ -943,9 +937,8 @@
 
     >>> cat(bin, 'run') # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-install/demo-0.3-py2.4.egg',
         '/sample-install/demoneeded-1.1-py2.4.egg',
         ...
@@ -992,9 +985,8 @@
     base = os.path.dirname(os.path.abspath(__file__))
     base = os.path.dirname(base)
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         join(base, 'eggs/demo-0.3-pyN.N.egg'),
         join(base, 'eggs/demoneeded-1.1-pyN.N.egg'),
         '/ba',
@@ -1028,7 +1020,7 @@
     base = os.path.dirname(os.path.abspath(__file__))
     base = os.path.dirname(base)
     <BLANKLINE>
-    import sys, os
+    import sys
     <BLANKLINE>
     _set_path = _interactive = True
     _force_interactive = False
@@ -1068,8 +1060,6 @@
         join(base, 'bar'),
         ...,
         ]
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[0:0] = pythonpath
     sys.path.insert(0, '.')
     <BLANKLINE>
     sys.argv[:] = _args

Modified: zc.buildout/branches/gary-support-system-python/src/zc/buildout/update.txt
===================================================================
--- zc.buildout/branches/gary-support-system-python/src/zc/buildout/update.txt	2009-08-12 15:52:19 UTC (rev 102712)
+++ zc.buildout/branches/gary-support-system-python/src/zc/buildout/update.txt	2009-08-12 20:17:49 UTC (rev 102713)
@@ -21,7 +21,7 @@
     ... index = %(new_releases)s
     ... parts = show-versions
     ... develop = showversions
-    ...
+    ... 
     ... [show-versions]
     ... recipe = showversions
     ... """ % dict(new_releases=new_releases))
@@ -31,7 +31,7 @@
 
     >>> mkdir(sample_buildout, 'showversions')
 
-    >>> write(sample_buildout, 'showversions', 'showversions.py',
+    >>> write(sample_buildout, 'showversions', 'showversions.py', 
     ... """
     ... import pkg_resources
     ...
@@ -52,7 +52,7 @@
     >>> write(sample_buildout, 'showversions', 'setup.py',
     ... """
     ... from setuptools import setup
-    ...
+    ... 
     ... setup(
     ...     name = "showversions",
     ...     entry_points = {'zc.buildout': ['default = showversions:Recipe']},
@@ -83,9 +83,8 @@
     >>> cat(sample_buildout, 'bin', 'buildout') # doctest: +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-buildout/eggs/zc.buildout-99.99-py2.4.egg',
         '/sample-buildout/eggs/setuptools-99.99-py2.4.egg',
         ...
@@ -109,7 +108,7 @@
     ... develop = showversions
     ... zc.buildout-version = < 99
     ... setuptools-version = < 99
-    ...
+    ... 
     ... [show-versions]
     ... recipe = showversions
     ... """ % dict(new_releases=new_releases))
@@ -128,7 +127,7 @@
     setuptools 0.6
 
 There are a number of cases, described below, in which the updates
-don't happen.
+don't happen. 
 
 We won't upgrade in offline mode:
 
@@ -139,7 +138,7 @@
     ... index = %(new_releases)s
     ... parts = show-versions
     ... develop = showversions
-    ...
+    ... 
     ... [show-versions]
     ... recipe = showversions
     ... """ % dict(new_releases=new_releases))
@@ -168,9 +167,9 @@
     ... [buildout]
     ... find-links = %(new_releases)s
     ... index = %(new_releases)s
-    ... parts =
+    ... parts = 
     ... """ % dict(new_releases=new_releases))
-
+    
     >>> cd(sample_buildout2)
     >>> print system(buildout),
     Creating directory '/sample_buildout2/bin'.

Modified: zc.buildout/branches/gary-support-system-python/zc.recipe.egg_/src/zc/recipe/egg/README.txt
===================================================================
--- zc.buildout/branches/gary-support-system-python/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2009-08-12 15:52:19 UTC (rev 102712)
+++ zc.buildout/branches/gary-support-system-python/zc.recipe.egg_/src/zc/recipe/egg/README.txt	2009-08-12 20:17:49 UTC (rev 102713)
@@ -96,7 +96,7 @@
     >>> ls(sample_buildout, 'bin')
     -  buildout
 
-If we want scripts provided by eggs to be installed, we should use the
+If we want scripts provided by eggs to be installed, we should use the 
 scripts recipe:
 
     >>> write(sample_buildout, 'buildout.cfg',
@@ -135,7 +135,7 @@
 
    This option is useful when working with distributions that don't
    declare entry points, such as distributions not written to work
-   with setuptools.
+   with setuptools. 
 
    Examples can be seen in the section "Specifying entry points" below.
 
@@ -271,7 +271,7 @@
     -  setuptools-0.6-py2.3.egg
     -  zc.buildout-1.0-py2.3.egg
 
-If we run the buildout on the default online and newest modes,
+If we run the buildout on the default online and newest modes, 
 we'll get an update for demo:
 
     >>> print system(buildout),
@@ -376,9 +376,8 @@
     ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
         '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
         '/foo/bar',
@@ -432,9 +431,8 @@
     base = os.path.dirname(os.path.abspath(__file__))
     base = os.path.dirname(base)
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         join(base, 'eggs/demo-0.4c1-pyN.N.egg'),
         join(base, 'eggs/demoneeded-1.2c1-pyN.N.egg'),
         '/foo/bar',
@@ -482,9 +480,8 @@
     base = os.path.dirname(os.path.abspath(__file__))
     base = os.path.dirname(base)
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         join(base, 'eggs/demo-0.4c1-pyN.N.egg'),
         join(base, 'eggs/demoneeded-1.2c1-pyN.N.egg'),
         '/foo/bar',
@@ -532,9 +529,8 @@
     ... # doctest: +NORMALIZE_WHITESPACE +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
         '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
         '/foo/bar',
@@ -592,9 +588,8 @@
     >>> cat(sample_buildout, 'bin', 'other') # doctest: +ELLIPSIS
     #!/usr/local/bin/python2.4
     <BLANKLINE>
-    import sys, os
-    pythonpath = filter(None, os.environ.get('PYTHONPATH', '').split(os.pathsep))
-    sys.path[:] = pythonpath + [
+    import sys
+    sys.path[:] = [
         '/sample-buildout/eggs/demo-0.4c1-py2.4.egg',
         '/sample-buildout/eggs/demoneeded-1.2c1-py2.4.egg',
         '/foo/bar',



More information about the Checkins mailing list