diff --git a/asv/plugins/virtualenv.py b/asv/plugins/virtualenv.py index c8923bc0f..752d22598 100644 --- a/asv/plugins/virtualenv.py +++ b/asv/plugins/virtualenv.py @@ -6,9 +6,7 @@ from distutils.version import LooseVersion import sys import re -import inspect import os -import subprocess import six @@ -58,11 +56,6 @@ def __init__(self, conf, python, requirements): raise environment.EnvironmentUnavailable( "virtualenv package not installed") - # Can't use `virtualenv.__file__` here, because that will refer to a - # .pyc file which can't be used on another version of Python - self._virtualenv_path = os.path.abspath( - inspect.getsourcefile(virtualenv)) - @staticmethod def _find_python(python): """Find Python executable for the given Python version""" @@ -137,7 +130,7 @@ def _setup(self): log.info("Creating virtualenv for {0}".format(self.name)) util.check_call([ sys.executable, - self._virtualenv_path, + "-mvirtualenv", '--no-site-packages', "-p", self._executable,