File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change 3
3
4
4
import os
5
5
import os .path
6
+ import platform
6
7
import site
7
8
import sys
8
9
import sysconfig
9
10
11
+ from distutils import sysconfig as distutils_sysconfig
10
12
from distutils .command .install import install , SCHEME_KEYS # noqa
11
13
12
14
from pip .compat import WINDOWS , expanduser
@@ -81,6 +83,11 @@ def virtualenv_no_global():
81
83
# FIXME doesn't account for venv linked to global site-packages
82
84
83
85
site_packages = sysconfig .get_path ("purelib" )
86
+ # This is because of a bug in PyPy's sysconfig module, see
87
+ # https://bitbucket.org/pypy/pypy/issues/2506/sysconfig-returns-incorrect-paths
88
+ # for more information.
89
+ if platform .python_implementation ().lower () == "pypy" :
90
+ site_packages = distutils_sysconfig .get_python_lib ()
84
91
user_site = site .USER_SITE
85
92
user_dir = expanduser ('~' )
86
93
if WINDOWS :
You can’t perform that action at this time.
0 commit comments