Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Commit

Permalink
Use sys.executable when calling virtualenv
Browse files Browse the repository at this point in the history
  • Loading branch information
asottile committed Feb 8, 2017
1 parent 4b5cbc0 commit c1e0704
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
- repo: https://github.com/pre-commit/pre-commit-hooks
sha: 616c1ebd1898c91de9a0548866a59cbd9f4547f6
sha: v0.7.1
hooks:
- id: trailing-whitespace
language_version: python2.7
Expand All @@ -19,7 +19,7 @@
- id: flake8
language_version: python2.7
- repo: https://github.com/asottile/reorder_python_imports
sha: 3d86483455ab5bd06cc1069fdd5ac57be5463f10
sha: v0.3.1
hooks:
- id: reorder-python-imports
language_version: python2.7
5 changes: 4 additions & 1 deletion requirements_tools/upgrade_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,10 @@ def cleanup_dir(dirname):
def make_virtualenv(args):
with cleanup_dir(tempfile.mkdtemp()) as tempdir:
venv, python, pip = dirs(tempdir)
print_call('virtualenv', venv, '-p', args.python, '--never-download')
print_call(
sys.executable, '-m', 'virtualenv', venv,
'-p', args.python, '--never-download',
)

def pip_install(*argv):
print_call(pip, 'install', '-i', args.index_url, *argv)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
],
install_requires=['pytest'],
install_requires=['pytest', 'virtualenv'],
packages=find_packages(exclude=('tests*',)),
entry_points={
'console_scripts': [
Expand Down

0 comments on commit c1e0704

Please sign in to comment.