[Checkins] SVN: zc.buildout/branches/help-api/src/zc/buildout/easy_install.py Be more careful about which py files we recompile.

Godefroid Chapelle gotcha at bubblenet.be
Sun Mar 29 17:23:30 EDT 2009


Log message for revision 98525:
  Be more careful about which py files we recompile.

Changed:
  U   zc.buildout/branches/help-api/src/zc/buildout/easy_install.py

-=-
Modified: zc.buildout/branches/help-api/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/help-api/src/zc/buildout/easy_install.py	2009-03-29 21:23:22 UTC (rev 98524)
+++ zc.buildout/branches/help-api/src/zc/buildout/easy_install.py	2009-03-29 21:23:30 UTC (rev 98525)
@@ -504,6 +504,8 @@
                         else:
                             shutil.copyfile(dist.location, newloc)
 
+                    redo_pyc(newloc)
+
                     # Getting the dist from the environment causes the
                     # distribution meta data to be read.  Cloning isn't
                     # good enough.
@@ -516,6 +518,8 @@
                     # deal with it:
                     dists = self._call_easy_install(
                         dist.location, ws, self._dest, dist)
+                    for dist in dists:
+                        redo_pyc(dist.location)
 
             finally:
                 if tmp != self._download_cache:
@@ -579,7 +583,6 @@
                 if ws.find(requirement) is None:
                     for dist in self._get_dist(requirement, ws, False):
                         ws.add(dist)
-                        redo_pyc(dist.location)
 
 
     def _constrain(self, requirement):
@@ -617,7 +620,6 @@
         for requirement in requirements:
             for dist in self._get_dist(requirement, ws, self._always_unzip):
                 ws.add(dist)
-                redo_pyc(dist.location)
                 self._maybe_add_setuptools(ws, dist)
 
         # OK, we have the requested distributions and they're in the working
@@ -644,7 +646,6 @@
                                            ):
                         
                     ws.add(dist)
-                    redo_pyc(dist.location)
                     self._maybe_add_setuptools(ws, dist)
             except pkg_resources.VersionConflict, err:
                 raise VersionConflict(err, ws)



More information about the Checkins mailing list