Commits

Ronald Oussoren committed 590df7c

parse_mf_results failed when one of the scripts had a name that didn't end in '.py'

  • Participants
  • Parent commits df52f1d
  • Branches branch-0.10

Comments (0)

Files changed (2)

doc/changelog.rst

 Bugfixes
 ........
 
-* ...
+* ``modulegraph.find.modules.parse_mf_results`` failed when the main script of
+  a py2app module didn't have a file name ending in '.py'.
 
 0.10.2
 ------

modulegraph/find_modules.py

 import warnings
 
 import modulegraph.modulegraph as modulegraph
-from modulegraph.modulegraph import Alias
+from modulegraph.modulegraph import Alias, Script
 from modulegraph.util import imp_find_module
 
 __all__ = [
         if src:
             suffix = os.path.splitext(src)[1]
 
-            if suffix in PY_SUFFIXES:
+            if isinstance(item, Script):
+                # Scripts are python files
+                py_files.append(item)
+            elif suffix in PY_SUFFIXES:
                 py_files.append(item)
             elif suffix in C_SUFFIXES:
                 extensions.append(item)