Skip to content

Commit 2895244

Browse files
committed
Closes python#15173: Tidied up copyright statements and removed pythonv references.
1 parent e51a369 commit 2895244

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

Lib/site.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -499,8 +499,8 @@ def venv(known_paths):
499499
global PREFIXES, ENABLE_USER_SITE
500500

501501
env = os.environ
502-
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in env:
503-
executable = os.environ['__PYTHONV_LAUNCHER__']
502+
if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env:
503+
executable = os.environ['__PYVENV_LAUNCHER__']
504504
else:
505505
executable = sys.executable
506506
executable_dir, executable_name = os.path.split(executable)

Lib/test/test_venv.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
Test harness for the venv module.
33
44
Copyright (C) 2011-2012 Vinay Sajip.
5+
Licensed to the PSF under a contributor agreement.
56
"""
67

78
import os
@@ -29,8 +30,8 @@ def setUp(self):
2930
self.pydocname = 'pydoc'
3031
self.lib = ('lib', 'python%s' % sys.version[:3])
3132
self.include = 'include'
32-
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in os.environ:
33-
executable = os.environ['__PYTHONV_LAUNCHER__']
33+
if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in os.environ:
34+
executable = os.environ['__PYVENV_LAUNCHER__']
3435
else:
3536
executable = sys.executable
3637
self.exe = os.path.split(executable)[-1]
@@ -69,9 +70,9 @@ def test_defaults(self):
6970
self.isdir(self.include)
7071
self.isdir(*self.lib)
7172
data = self.get_text_file_contents('pyvenv.cfg')
72-
if sys.platform == 'darwin' and ('__PYTHONV_LAUNCHER__'
73+
if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__'
7374
in os.environ):
74-
executable = os.environ['__PYTHONV_LAUNCHER__']
75+
executable = os.environ['__PYVENV_LAUNCHER__']
7576
else:
7677
executable = sys.executable
7778
path = os.path.dirname(executable)
@@ -127,7 +128,7 @@ def test_symlinking(self):
127128
for usl in (False, True):
128129
builder = venv.EnvBuilder(clear=True, symlinks=usl)
129130
if (usl and sys.platform == 'darwin' and
130-
'__PYTHONV_LAUNCHER__' in os.environ):
131+
'__PYVENV_LAUNCHER__' in os.environ):
131132
self.assertRaises(ValueError, builder.create, self.env_dir)
132133
else:
133134
builder.create(self.env_dir)

Lib/venv/__init__.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
"""
22
Virtual environment (venv) package for Python. Based on PEP 405.
33
4-
Copyright (C) 20011-2012 Vinay Sajip. All Rights Reserved.
4+
Copyright (C) 2011-2012 Vinay Sajip.
5+
Licensed to the PSF under a contributor agreement.
56
67
usage: python -m venv [-h] [--system-site-packages] [--symlinks] [--clear]
78
[--upgrade]
@@ -36,7 +37,6 @@
3637
import threading
3738
except ImportError:
3839
threading = None
39-
import zipfile
4040

4141
logger = logging.getLogger(__name__)
4242

@@ -119,8 +119,8 @@ def create_if_needed(d):
119119
context.prompt = '(%s) ' % context.env_name
120120
create_if_needed(env_dir)
121121
env = os.environ
122-
if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in env:
123-
executable = os.environ['__PYTHONV_LAUNCHER__']
122+
if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env:
123+
executable = os.environ['__PYVENV_LAUNCHER__']
124124
else:
125125
executable = sys.executable
126126
dirname, exename = os.path.split(os.path.abspath(executable))
@@ -346,8 +346,7 @@ def main(args=None):
346346
elif not hasattr(sys, 'base_prefix'):
347347
compatible = False
348348
if not compatible:
349-
raise ValueError('This script is only for use with '
350-
'Python 3.3 (pythonv variant)')
349+
raise ValueError('This script is only for use with Python 3.3')
351350
else:
352351
import argparse
353352

Mac/Tools/pythonw.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ main(int argc, char **argv) {
159159
status = _NSGetExecutablePath(path, &size);
160160
if (status == 0) {
161161
if (realpath(path, real_path) != NULL) {
162-
setenv("__PYTHONV_LAUNCHER__", real_path, 1);
162+
setenv("__PYVENV_LAUNCHER__", real_path, 1);
163163
}
164164
}
165165

0 commit comments

Comments
 (0)