Permalink
Browse files

Updates for upcoming changes in pypy stdlib paths

  • Loading branch information...
1 parent 6975ea7 commit c3bb465cc3c3fb069c85fde7f23dbf9e4063ee0b @bdkearns bdkearns committed Mar 14, 2013
Showing with 148 additions and 144 deletions.
  1. +141 −140 virtualenv.py
  2. +7 −4 virtualenv_embedded/site.py
View
@@ -560,13 +560,16 @@ def virtual_install_main_packages():
if _is_jython:
paths = [os.path.join(sys.real_prefix, 'Lib')]
elif _is_pypy:
- if sys.pypy_version_info >= (1, 5):
+ if sys.pypy_version_info >= (2, 0):
+ cpyver = '%d' % sys.version_info[0]
+ elif sys.pypy_version_info >= (1, 5):
cpyver = '%d.%d' % sys.version_info[:2]
else:
cpyver = '%d.%d.%d' % sys.version_info[:3]
- paths = [os.path.join(sys.real_prefix, 'lib_pypy'),
- os.path.join(sys.real_prefix, 'lib-python', 'modified-%s' % cpyver),
- os.path.join(sys.real_prefix, 'lib-python', cpyver)]
+ paths = [os.path.join(sys.real_prefix, 'lib_pypy')] + \
+ ([os.path.join(sys.real_prefix, 'lib-python', 'modified-%s' % cpyver)]
+ if sys.pypy_version_info < (1, 9) else []) + \
+ [os.path.join(sys.real_prefix, 'lib-python', cpyver)]
hardcoded_relative_dirs = paths[:] # for the special 'darwin' case below
#
# This is hardcoded in the Python executable, but relative to sys.prefix:

0 comments on commit c3bb465

Please sign in to comment.