diff options
author | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2006-04-14 19:13:24 +0000 |
---|---|---|
committer | phillip.eby <phillip.eby@6015fed2-1504-0410-9fe1-9d1591cc4771> | 2006-04-14 19:13:24 +0000 |
commit | acc93bc85f9cd6c67455bf3556871c8c9df50ff1 (patch) | |
tree | 0fb1cc4435e40c4822f9f5006e473fe241bed7a9 /pkg_resources.py | |
parent | 4ca9ee498660eb23ea667e04fe19d7e3bba29b15 (diff) | |
download | python-setuptools-acc93bc85f9cd6c67455bf3556871c8c9df50ff1.tar.gz |
Don't eagerly import namespace packages. This was the big reason for
branching to 0.7 now, as I wanted this wart gone before anything went
into Python 2.5. But it's gone now, yay!
git-svn-id: http://svn.python.org/projects/sandbox/trunk/setuptools@45403 6015fed2-1504-0410-9fe1-9d1591cc4771
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 01c784e..b5971e6 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2045,8 +2045,8 @@ class Distribution(object): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - map(declare_namespace, self._get_metadata('namespace_packages.txt')) - + for pkg in self._get_metadata('namespace_packages.txt'): + if pkg in sys.modules: declare_namespace(pkg) def egg_name(self): """Return what this distribution's standard .egg filename should be""" |