diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-30 21:46:38 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-30 21:46:38 +0300 |
commit | 489781ea3eae1e6b169f4ebc35ec0cf7bd3e269b (patch) | |
tree | 905991526bea989fe37561696d340ecebb5a9363 /astroid/builder.py | |
parent | 4409770f227d0641e6f85c2ee89b044f5d3f9998 (diff) | |
download | astroid-489781ea3eae1e6b169f4ebc35ec0cf7bd3e269b.tar.gz |
Add some fixes which enhances the Jython support.
The fix mostly includes updates to modutils, which is
modified in order to properly lookup paths from live objects,
which ends in $py.class, not pyc as for Python 2,
Closes issue #83.
Diffstat (limited to 'astroid/builder.py')
-rw-r--r-- | astroid/builder.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/astroid/builder.py b/astroid/builder.py index 671d75c..5aaab5c 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -32,7 +32,7 @@ from astroid.raw_building import InspectBuilder from astroid.rebuilder import TreeRebuilder from astroid.manager import AstroidManager from astroid.bases import YES, Instance -from astroid.modutils import modpath_from_file +from astroid.modutils import modpath_from_file, _path_from_filename from _ast import PyCF_ONLY_AST def parse(string): @@ -94,7 +94,7 @@ class AstroidBuilder(InspectBuilder): node = None path = getattr(module, '__file__', None) if path is not None: - path_, ext = splitext(module.__file__) + path_, ext = splitext(_path_from_filename(path)) if ext in ('.py', '.pyc', '.pyo') and exists(path_ + '.py'): node = self.file_build(path_ + '.py', modname) if node is None: |