Skip to content

Commit

Permalink
lib path fixes for pypy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
qwcode committed Mar 30, 2014
1 parent ca55f9f commit 2264dc4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,9 @@ def __init__(self, base_path, *args, **kwargs):
# Store paths related to the virtual environment
_virtualenv = kwargs.pop("virtualenv")
venv, lib, include, bin = virtualenv.path_locations(_virtualenv)
# workaround for https://github.com/pypa/virtualenv/issues/306
if hasattr(sys, "pypy_version_info"):
lib = os.path.join(venv, 'lib-python', pyversion)
self.venv_path = venv
self.lib_path = lib
self.include_path = include
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/venv.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import absolute_import

import os
import sys
import subprocess

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

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

Expand Down

0 comments on commit 2264dc4

Please sign in to comment.