summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/modulefinder.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/modulefinder.py b/Lib/modulefinder.py
index be59f97f2b..6dec0e5903 100644
--- a/Lib/modulefinder.py
+++ b/Lib/modulefinder.py
@@ -210,7 +210,12 @@ class ModuleFinder:
if not m.__path__:
return
modules = {}
- suffixes = [".py", ".pyc", ".pyo"]
+ # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"].
+ # But we must also collect Python extension modules - although
+ # we cannot separate normal dlls from Python extensions.
+ suffixes = []
+ for triple in imp.get_suffixes():
+ suffixes.append(triple[0])
for dir in m.__path__:
try:
names = os.listdir(dir)