changeset: 77758:c96dd645825e user: Vinay Sajip date: Mon Jun 25 00:47:46 2012 +0100 files: Lib/site.py Lib/test/test_venv.py Lib/venv/__init__.py Mac/Tools/pythonw.c description: Closes #15173: Tidied up copyright statements and removed pythonv references. diff -r 2051fead1933 -r c96dd645825e Lib/site.py --- a/Lib/site.py Sun Jun 24 19:13:55 2012 -0400 +++ b/Lib/site.py Mon Jun 25 00:47:46 2012 +0100 @@ -499,8 +499,8 @@ global PREFIXES, ENABLE_USER_SITE env = os.environ - if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in env: - executable = os.environ['__PYTHONV_LAUNCHER__'] + if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env: + executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable executable_dir, executable_name = os.path.split(executable) diff -r 2051fead1933 -r c96dd645825e Lib/test/test_venv.py --- a/Lib/test/test_venv.py Sun Jun 24 19:13:55 2012 -0400 +++ b/Lib/test/test_venv.py Mon Jun 25 00:47:46 2012 +0100 @@ -2,6 +2,7 @@ Test harness for the venv module. Copyright (C) 2011-2012 Vinay Sajip. +Licensed to the PSF under a contributor agreement. """ import os @@ -29,8 +30,8 @@ self.pydocname = 'pydoc' self.lib = ('lib', 'python%s' % sys.version[:3]) self.include = 'include' - if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in os.environ: - executable = os.environ['__PYTHONV_LAUNCHER__'] + if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in os.environ: + executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable self.exe = os.path.split(executable)[-1] @@ -69,9 +70,9 @@ self.isdir(self.include) self.isdir(*self.lib) data = self.get_text_file_contents('pyvenv.cfg') - if sys.platform == 'darwin' and ('__PYTHONV_LAUNCHER__' + if sys.platform == 'darwin' and ('__PYVENV_LAUNCHER__' in os.environ): - executable = os.environ['__PYTHONV_LAUNCHER__'] + executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable path = os.path.dirname(executable) @@ -127,7 +128,7 @@ for usl in (False, True): builder = venv.EnvBuilder(clear=True, symlinks=usl) if (usl and sys.platform == 'darwin' and - '__PYTHONV_LAUNCHER__' in os.environ): + '__PYVENV_LAUNCHER__' in os.environ): self.assertRaises(ValueError, builder.create, self.env_dir) else: builder.create(self.env_dir) diff -r 2051fead1933 -r c96dd645825e Lib/venv/__init__.py --- a/Lib/venv/__init__.py Sun Jun 24 19:13:55 2012 -0400 +++ b/Lib/venv/__init__.py Mon Jun 25 00:47:46 2012 +0100 @@ -1,7 +1,8 @@ """ Virtual environment (venv) package for Python. Based on PEP 405. -Copyright (C) 20011-2012 Vinay Sajip. All Rights Reserved. +Copyright (C) 2011-2012 Vinay Sajip. +Licensed to the PSF under a contributor agreement. usage: python -m venv [-h] [--system-site-packages] [--symlinks] [--clear] [--upgrade] @@ -36,7 +37,6 @@ import threading except ImportError: threading = None -import zipfile logger = logging.getLogger(__name__) @@ -119,8 +119,8 @@ context.prompt = '(%s) ' % context.env_name create_if_needed(env_dir) env = os.environ - if sys.platform == 'darwin' and '__PYTHONV_LAUNCHER__' in env: - executable = os.environ['__PYTHONV_LAUNCHER__'] + if sys.platform == 'darwin' and '__PYVENV_LAUNCHER__' in env: + executable = os.environ['__PYVENV_LAUNCHER__'] else: executable = sys.executable dirname, exename = os.path.split(os.path.abspath(executable)) @@ -346,8 +346,7 @@ elif not hasattr(sys, 'base_prefix'): compatible = False if not compatible: - raise ValueError('This script is only for use with ' - 'Python 3.3 (pythonv variant)') + raise ValueError('This script is only for use with Python 3.3') else: import argparse diff -r 2051fead1933 -r c96dd645825e Mac/Tools/pythonw.c --- a/Mac/Tools/pythonw.c Sun Jun 24 19:13:55 2012 -0400 +++ b/Mac/Tools/pythonw.c Mon Jun 25 00:47:46 2012 +0100 @@ -159,7 +159,7 @@ status = _NSGetExecutablePath(path, &size); if (status == 0) { if (realpath(path, real_path) != NULL) { - setenv("__PYTHONV_LAUNCHER__", real_path, 1); + setenv("__PYVENV_LAUNCHER__", real_path, 1); } }

AltStyle によって変換されたページ (->オリジナル) /