Skip to content

Commit 2264dc4

Browse files
committed
lib path fixes for pypy tests
1 parent ca55f9f commit 2264dc4

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

tests/lib/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ def __init__(self, base_path, *args, **kwargs):
234234
# Store paths related to the virtual environment
235235
_virtualenv = kwargs.pop("virtualenv")
236236
venv, lib, include, bin = virtualenv.path_locations(_virtualenv)
237+
# workaround for https://github.com/pypa/virtualenv/issues/306
238+
if hasattr(sys, "pypy_version_info"):
239+
lib = os.path.join(venv, 'lib-python', pyversion)
237240
self.venv_path = venv
238241
self.lib_path = lib
239242
self.include_path = include

tests/lib/venv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from __future__ import absolute_import
22

33
import os
4+
import sys
45
import subprocess
56

67
import virtualenv as _virtualenv
@@ -27,6 +28,9 @@ def __init__(self, location, *args, **kwargs):
2728
self._system_site_packages = kwargs.pop("system_site_packages", False)
2829

2930
home, lib, inc, bin = _virtualenv.path_locations(self.location)
31+
# workaround for https://github.com/pypa/virtualenv/issues/306
32+
if hasattr(sys, "pypy_version_info"):
33+
lib = os.path.join(home, 'lib-python', sys.version[:3])
3034
self.lib = Path(lib)
3135
self.bin = Path(bin)
3236

0 commit comments

Comments
 (0)