Issue #25154: Deprecate the pyvenv script.

This was done so as to move users to `python3 -m venv` which prevents
confusion over which Python interpreter will be used in the virtual
environment when more than one is installed.
This commit is contained in:
Brett Cannon 2015-10-16 15:14:27 -07:00
parent c0d91aff9a
commit 9b63868f77
3 changed files with 16 additions and 1 deletions

View file

@ -1,6 +1,12 @@
#!/usr/bin/env python3
if __name__ == '__main__':
import sys
import pathlib
executable = pathlib.Path(sys.executable or 'python3').name
print('WARNING: the pyenv script is deprecated in favour of '
'`{} -m venv`'.format(exeutable, file=sys.stderr))
rc = 1
try:
import venv