Skip to content
This repository has been archived by the owner on Jul 23, 2020. It is now read-only.

Leverage virtualenv to ensure pip and setuptools and wheel are recent #25

Closed
wants to merge 9 commits into from
8 changes: 8 additions & 0 deletions src/tox_venv/hooks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import os
import platform
import subprocess

import virtualenv

import tox


Expand Down Expand Up @@ -102,4 +105,9 @@ def tox_testenv_create(venv, action):
args.append(venv.path.basename)
venv._pcall(args, venv=False, action=action, cwd=basepath)
# Return non-None to indicate the plugin has completed
exe_dir = 'Scripts' if platform.system() == 'Windows' else 'bin'
virtualenv.install_wheel(
project_names=['setuptools', 'pip', 'wheel'],
py_executable=str(venv.path / exe_dir / 'python'),
)
return True