[Checkins] SVN: zc.buildout/trunk/src/zc/buildout/ When bootstrapping with a buildout that has develop eggs for buildout

Jim Fulton jim at zope.com
Wed Oct 11 07:13:06 EDT 2006


Log message for revision 70602:
  When bootstrapping with a buildout that has develop eggs for buildout
  or setuptools, copy the develop eggs to the new buildout's
  develop-eggs directory, rather than its eggs directory.
  

Changed:
  U   zc.buildout/trunk/src/zc/buildout/buildout.py
  U   zc.buildout/trunk/src/zc/buildout/buildout.txt
  U   zc.buildout/trunk/src/zc/buildout/testing.py

-=-
Modified: zc.buildout/trunk/src/zc/buildout/buildout.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.py	2006-10-11 07:35:16 UTC (rev 70601)
+++ zc.buildout/trunk/src/zc/buildout/buildout.py	2006-10-11 11:13:03 UTC (rev 70602)
@@ -219,7 +219,7 @@
             r = pkg_resources.Requirement.parse(name)
             dist = pkg_resources.working_set.find(r)
             if dist.precedence == pkg_resources.DEVELOP_DIST:
-                dest = os.path.join(self['buildout']['eggs-directory'],
+                dest = os.path.join(self['buildout']['develop-eggs-directory'],
                                     name+'.egg-link')
                 open(dest, 'w').write(dist.location)
                 entries.append(dist.location)

Modified: zc.buildout/trunk/src/zc/buildout/buildout.txt
===================================================================
--- zc.buildout/trunk/src/zc/buildout/buildout.txt	2006-10-11 07:35:16 UTC (rev 70601)
+++ zc.buildout/trunk/src/zc/buildout/buildout.txt	2006-10-11 11:13:03 UTC (rev 70602)
@@ -1305,10 +1305,16 @@
     >>> ls(sample_bootstrapped, 'bin')
     -  buildout
 
-    >>> ls(sample_bootstrapped, 'eggs')
+    >>> _ = (ls(sample_bootstrapped, 'eggs'),
+    ...      ls(sample_bootstrapped, 'develop-eggs'))
     -  setuptools-0.6-py2.3.egg
     -  zc.buildout-1.0-py2.3.egg
 
+(We list both the eggs and develop-eggs diectories because the
+buildout or setuptools egg could be installed in the develop-eggs
+directory if the original buildout had develop eggs for either
+buildout or setuptools.)
+
 Note that the buildout script was installed but not run.  To run
 the buildout, we'd have to run the installed buildout script.
 

Modified: zc.buildout/trunk/src/zc/buildout/testing.py
===================================================================
--- zc.buildout/trunk/src/zc/buildout/testing.py	2006-10-11 07:35:16 UTC (rev 70601)
+++ zc.buildout/trunk/src/zc/buildout/testing.py	2006-10-11 11:13:03 UTC (rev 70602)
@@ -170,8 +170,16 @@
     # Use the buildout bootstrap command to create a buildout
     zc.buildout.buildout.Buildout(
         os.path.join(sample, 'buildout.cfg'),
-        [('buildout', 'log-level', 'WARNING')]
+        [('buildout', 'log-level', 'WARNING'),
+         # trick bootstrap into putting the buildout develop egg
+         # in the eggs dir.
+         ('buildout', 'develop-eggs-directory', 'eggs'),
+         ]
         ).bootstrap([])
+    
+    # Create the develop-eggs dir, which didn't get created the usual
+    # way due to thr trick above:
+    os.mkdir(os.path.join(sample, 'develop-eggs'))
 
     def start_server(path):
         port, thread = _start_server(path, name=path)



More information about the Checkins mailing list