diff options
author | PJ Eby <distutils-sig@python.org> | 2006-04-14 19:13:24 +0000 |
---|---|---|
committer | PJ Eby <distutils-sig@python.org> | 2006-04-14 19:13:24 +0000 |
commit | 868c0d39e6fced1d53d8dfd7cf2136cc3e47ab61 (patch) | |
tree | 4d0f5b8aab3c00f2a6a87a292f5eb8e35484e0e8 /pkg_resources.py | |
parent | 2073779a928690e0b6902d7f099087478502b28c (diff) | |
download | python-setuptools-bitbucket-868c0d39e6fced1d53d8dfd7cf2136cc3e47ab61.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!
Diffstat (limited to 'pkg_resources.py')
-rw-r--r-- | pkg_resources.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 2a47c58b..2d656f1a 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2311,7 +2311,9 @@ class Distribution(object): self.insert_on(path) if path is sys.path: fixup_namespace_packages(self.location) - list(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""" |