aboutsummaryrefslogtreecommitdiffstats
path: root/pythoneggs.py
diff options
context:
space:
mode:
Diffstat (limited to 'pythoneggs.py')
-rwxr-xr-xpythoneggs.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pythoneggs.py b/pythoneggs.py
index 367aad1..a1c819b 100755
--- a/pythoneggs.py
+++ b/pythoneggs.py
@@ -12,7 +12,6 @@
from getopt import getopt
from os.path import basename, dirname, isdir, sep, splitext
from sys import argv, stderr, stdin, version
-from pkg_resources import Distribution, FileMetadata, PathMetadata
from distutils.sysconfig import get_python_lib
@@ -82,6 +81,8 @@ for f in files:
parent_name.endswith('.egg-info') or \
parent_name.endswith('.egg-link')
if file_match or dir_match:
+ # This import is very slow, so only do it if needed
+ from pkg_resources import Distribution, FileMetadata, PathMetadata
dist_name = basename(f)
if dir_match:
path_item = dirname(parent_name)