Ronald Oussoren avatar Ronald Oussoren committed 02055c5 Merge

merge

Comments (0)

Files changed (3)

doc/changelog.rst

 ........
 
 * Hardcode knowlegde about the compatibility aliases in the email
-  module (for python 2.5 upto 3.0). 
+  module (for python 2.5 upto 3.0).
 
   This makes it possible to remove a heavy-handed recipe from py2app.
 
+0.10.5
+------
+
+This is a bugfix release
+
+* Don't look at the file extension to determine the file type
+  in modulegraph.find_modules.parse_mf_results, but use the
+  class of the item.
+
 0.10.4
 ------
 
 Bugfixes
 ........
 
-* Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref 
+* Issue #11: creating xrefs and dotty graphs from modulegraphs (the --xref
   and --graph options of py2app) didn't work with python 3 due to use of
   APIs that aren't available in that version of python.
 
   include subpackages for the "packages" argument as well, but that code
   didn't work at all.
 
-* Issue #9: The modulegraph script is deprecated, use 
+* Issue #9: The modulegraph script is deprecated, use
   "python -mmodulegraph" instead.
 
 * Issue #10: Ensure that the result of "zipio.open" can be used
   in a with statement (that is, ``with zipio.open(...) as fp``.
 
-* No longer use "2to3" to support Python 3. 
+* No longer use "2to3" to support Python 3.
 
   Because of this modulegraph now supports Python 2.6
   and later.
 * Implement support for PEP 420 ("Implicit namespace packages")
   in Python 3.3.
 
-* ``modulegraph.util.imp_walk`` is deprecated and will be 
+* ``modulegraph.util.imp_walk`` is deprecated and will be
   removed in the next release of this package.
 
 Bugfixes
   of "pkg" contains "import sub.nomod" we now create a MissingModule node
   for "pkg.sub.nomod" instead of "sub.nomod".
 
-  This fixes an issue with including the crcmod package in application 
+  This fixes an issue with including the crcmod package in application
   bundles, first reported on the pythonmac-sig mailinglist by
   Brendan Simon.
 
   The documention is very rough at this moment and in need of reorganisation and
   language cleanup. I've basiclly writting the current version by reading the code
   and documenting what it does, the order in which classes and methods are document
-  is therefore not necessarily the most useful. 
+  is therefore not necessarily the most useful.
 
 - The repository has moved to bitbucket
 
 - Added a simple commandline tool (``modulegraph``) that will print information
   about the dependency graph of a script.
 
-- Added a module (``zipio``) for dealing with paths that may refer to entries 
+- Added a module (``zipio``) for dealing with paths that may refer to entries
   inside zipfiles (such as source paths referring to modules in zipped eggfiles).
 
   With this addition ``modulegraph.modulegraph.os_listdir`` is deprecated and

modulegraph/find_modules.py

 import warnings
 
 import modulegraph.modulegraph as modulegraph
-from modulegraph.modulegraph import Alias, Script
+from modulegraph.modulegraph import Alias, Script, Extension
 from modulegraph.util import imp_find_module
 
 __all__ = [
         if item.identifier == "__main__":
             continue
         src = item.filename
-        if src:
-            suffix = os.path.splitext(src)[1]
-
+        if src and src != '-':
             if isinstance(item, Script):
                 # Scripts are python files
                 py_files.append(item)
-            elif suffix in PY_SUFFIXES:
+
+            elif isinstance(item, Extension):
+                extensions.append(item)
+
+            else:
                 py_files.append(item)
-            elif suffix in C_SUFFIXES:
-                extensions.append(item)
-            else:
-                raise TypeError("Don't know how to handle '%s'" % repr(src))
 
     # sort on the file names, the output is nicer to read
     py_files.sort(key=lambda v: v.filename)
 license = MIT
 packages = modulegraph
 platforms = any
-install_requires = 
+install_requires =
    altgraph >= 0.11
 zip-safe = yes
-console_scripts = 
+console_scripts =
    modulegraph = modulegraph.__main__:main
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.