[Checkins] SVN: zc.buildout/branches/gary-4/src/zc/buildout/easy_install. revert attempt to skip some of the pkg_resources dance: it caused me trouble.

Gary Poster gary.poster at canonical.com
Fri Feb 12 11:35:26 EST 2010


Log message for revision 108956:
  revert attempt to skip some of the pkg_resources dance: it caused me trouble.

Changed:
  U   zc.buildout/branches/gary-4/src/zc/buildout/easy_install.py
  U   zc.buildout/branches/gary-4/src/zc/buildout/easy_install.txt

-=-
Modified: zc.buildout/branches/gary-4/src/zc/buildout/easy_install.py
===================================================================
--- zc.buildout/branches/gary-4/src/zc/buildout/easy_install.py	2010-02-12 16:04:25 UTC (rev 108955)
+++ zc.buildout/branches/gary-4/src/zc/buildout/easy_install.py	2010-02-12 16:35:25 UTC (rev 108956)
@@ -1442,12 +1442,7 @@
     import pkg_resources'''
 
 addsitedir_namespace_originalpackages_snippet = '''
-            for dist in pkg_resources.find_distributions(sitedir, True):
-                pkg_resources.fixup_namespace_packages(dist.location)
-                if dist.has_metadata('namespace_packages.txt'):
-                    for namespace in dist.get_metadata_lines(
-                        'namespace_packages.txt'):
-                        pkg_resources.declare_namespace(namespace)'''
+            pkg_resources.working_set.add_entry(sitedir)'''
 
 original_path_snippet = '''
     original_paths = [

Modified: zc.buildout/branches/gary-4/src/zc/buildout/easy_install.txt
===================================================================
--- zc.buildout/branches/gary-4/src/zc/buildout/easy_install.txt	2010-02-12 16:04:25 UTC (rev 108955)
+++ zc.buildout/branches/gary-4/src/zc/buildout/easy_install.txt	2010-02-12 16:35:25 UTC (rev 108956)
@@ -1287,12 +1287,7 @@
             if not sitedircase in known_paths and os.path.exists(sitedir):
                 sys.path.append(sitedir)
                 known_paths.add(sitedircase)
-                for dist in pkg_resources.find_distributions(sitedir, True):
-                    pkg_resources.fixup_namespace_packages(dist.location)
-                    if dist.has_metadata('namespace_packages.txt'):
-                        for namespace in dist.get_metadata_lines(
-                            'namespace_packages.txt'):
-                            pkg_resources.declare_namespace(namespace)
+                pkg_resources.working_set.add_entry(sitedir)
         original_paths = [
             ...
             ]
@@ -1354,12 +1349,7 @@
             if not sitedircase in known_paths and os.path.exists(sitedir):
                 sys.path.append(sitedir)
                 known_paths.add(sitedircase)
-                for dist in pkg_resources.find_distributions(sitedir, True):
-                    pkg_resources.fixup_namespace_packages(dist.location)
-                    if dist.has_metadata('namespace_packages.txt'):
-                        for namespace in dist.get_metadata_lines(
-                            'namespace_packages.txt'):
-                            pkg_resources.declare_namespace(namespace)
+                pkg_resources.working_set.add_entry(sitedir)
         original_paths = [
             ...
             ]



More information about the checkins mailing list