[cig-commits] r13262 - in cs/merlin/branches/v1: . merlin merlin.egg-info

leif at geodynamics.org leif at geodynamics.org
Wed Nov 5 15:47:01 PST 2008


Author: leif
Date: 2008-11-05 15:47:01 -0800 (Wed, 05 Nov 2008)
New Revision: 13262

Modified:
   cs/merlin/branches/v1/PKG-INFO
   cs/merlin/branches/v1/merlin.egg-info/PKG-INFO
   cs/merlin/branches/v1/merlin/__init__.py
   cs/merlin/branches/v1/setup.py
Log:
Don't iterate in EggProvider._setup_prefix().  On Brad's machine,
Merlin found a ZIP file embedded inside a non-zip egg:

enthought.tvtk-2.0.2-py2.5-macosx-10.4-i386.egg/enthought/tvtk/tvtk_classes.zip

Starting with this path, it kept walking up the directory tree until
it found the parent egg info:

enthought.tvtk-2.0.2-py2.5-macosx-10.4-i386.egg/EGG-INFO

It took this to be the egg_info for 'tvtk_classes', which is obviously
wrong... 'tvtk_classes.zip' isn't even an egg.  This lead to an
assertion error in ZipProvider._zipinfo_name ("XXX is not a subpath of
YYY").  AFAICT, this bug still exists in the current version of
setuptools (v0.6c9).

Also, I killed the annoying UserWarning for "pkg_resources" (in
addition to "site", see r12134.)  Unforunately, it isn't easy to kill
the corresponding warnings from 'setuptools'.


Modified: cs/merlin/branches/v1/PKG-INFO
===================================================================
--- cs/merlin/branches/v1/PKG-INFO	2008-11-05 05:26:20 UTC (rev 13261)
+++ cs/merlin/branches/v1/PKG-INFO	2008-11-05 23:47:01 UTC (rev 13262)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: merlin
-Version: 1.4
+Version: 1.6
 Summary: A custom version of Phillip J. Eby's setuptools.
 Home-page: http://www.geodynamics.org/cig/software/packages/cs/pythia/
 Author: Leif Strand

Modified: cs/merlin/branches/v1/merlin/__init__.py
===================================================================
--- cs/merlin/branches/v1/merlin/__init__.py	2008-11-05 05:26:20 UTC (rev 13261)
+++ cs/merlin/branches/v1/merlin/__init__.py	2008-11-05 23:47:01 UTC (rev 13262)
@@ -1321,14 +1321,11 @@
         # of multiple eggs; that's why we use module_path instead of .archive
         path = self.module_path
         old = None
-        while path!=old:
-            if path.lower().endswith('.egg'):
-                self.egg_name = os.path.basename(path)
-                self.egg_info = os.path.join(path, 'EGG-INFO')
-                self.egg_root = path
-                break
-            old = path
-            path, base = os.path.split(path)
+        if path.lower().endswith('.egg'):
+            self.egg_name = os.path.basename(path)
+            self.egg_info = os.path.join(path, 'EGG-INFO')
+            self.egg_root = path
+        return
 
 
 
@@ -1336,7 +1333,6 @@
 
 
 
-
 class DefaultProvider(EggProvider):
     """Provides access to package resources in the filesystem"""
 
@@ -2377,7 +2373,7 @@
             fn = getattr(sys.modules[modname], '__file__', None)
             if fn and normalize_path(fn).startswith(loc):
                 continue
-            if modname != "site":
+            if not modname in ["site", "pkg_resources"]:
                 issue_warning(
                     "Module %s was already imported from %s, but %s is being added"
                     " to sys.path" % (modname, fn, self.location),

Modified: cs/merlin/branches/v1/merlin.egg-info/PKG-INFO
===================================================================
--- cs/merlin/branches/v1/merlin.egg-info/PKG-INFO	2008-11-05 05:26:20 UTC (rev 13261)
+++ cs/merlin/branches/v1/merlin.egg-info/PKG-INFO	2008-11-05 23:47:01 UTC (rev 13262)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.0
 Name: merlin
-Version: 1.5
+Version: 1.6
 Summary: A custom version of Phillip J. Eby's setuptools.
 Home-page: http://www.geodynamics.org/cig/software/packages/cs/pythia/
 Author: Leif Strand

Modified: cs/merlin/branches/v1/setup.py
===================================================================
--- cs/merlin/branches/v1/setup.py	2008-11-05 05:26:20 UTC (rev 13261)
+++ cs/merlin/branches/v1/setup.py	2008-11-05 23:47:01 UTC (rev 13262)
@@ -19,7 +19,7 @@
 d = {}; execfile(convert_path('merlin/command/__init__.py'), d)
 SETUP_COMMANDS = d['__all__']
 
-VERSION = "1.5"
+VERSION = "1.6"
 from merlin import setup, find_packages
 import sys
 scripts = []



More information about the CIG-COMMITS mailing list