summaryrefslogtreecommitdiff
path: root/astroid/modutils.py
diff options
context:
space:
mode:
authorClaudiu Popa <pcmanticore@gmail.com>2015-12-15 19:16:57 +0200
committerClaudiu Popa <pcmanticore@gmail.com>2015-12-15 19:16:57 +0200
commit60a5a783e164d9095bccdbf787c6ff01ca8176e0 (patch)
tree3939b4afc536b60ffc128eecac67bceb17078e54 /astroid/modutils.py
parentccb797f42d040d371cce133ab7251721086e7575 (diff)
downloadastroid-git-60a5a783e164d9095bccdbf787c6ff01ca8176e0.tar.gz
Improve the detection of lib_pypy, which was faulty.
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r--astroid/modutils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py
index 4a749365..14c53b3a 100644
--- a/astroid/modutils.py
+++ b/astroid/modutils.py
@@ -79,8 +79,9 @@ try:
except AttributeError:
pass
if platform.python_implementation() == 'PyPy':
- _root = os.path.dirname(sys.executable)
- STD_LIB_DIRS.add(os.path.join(_root, 'lib_pypy'))
+ _root = os.path.join(sys.prefix, 'lib_pypy')
+ STD_LIB_DIRS.add(_root)
+ del _root
# get_python_lib(standard_lib=1) is not available on pypy, set STD_LIB_DIR to
# non-valid path, see https://bugs.pypy.org/issue1164
except DistutilsPlatformError: