[Python-modules-commits] [python-virtualenv] 01/07: Import python-virtualenv_15.0.3+ds.orig.tar.gz

Barry Warsaw barry at moszumanska.debian.org
Fri Aug 19 18:03:34 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-virtualenv.

commit 72e282aa85135921129990c97c95b4da9eb66bbd
Author: Barry Warsaw <barry at python.org>
Date:   Fri Aug 19 13:51:52 2016 -0400

    Import python-virtualenv_15.0.3+ds.orig.tar.gz
---
 PKG-INFO                        | 21 +++++++++++----------
 docs/changes.rst                | 11 +++++++++++
 tests/test_virtualenv.py        | 12 +++++++-----
 virtualenv.egg-info/PKG-INFO    | 21 +++++++++++----------
 virtualenv.egg-info/SOURCES.txt |  2 +-
 virtualenv.py                   | 31 +++++++++++++------------------
 6 files changed, 54 insertions(+), 44 deletions(-)

diff --git a/PKG-INFO b/PKG-INFO
index fe3d773..75c8a96 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: virtualenv
-Version: 15.0.2
+Version: 15.0.3
 Summary: Virtual Python Environment builder
 Home-page: https://virtualenv.pypa.io/
 Author: Jannis Leidel, Carl Meyer and Brian Rosner
@@ -47,25 +47,26 @@ Description: Virtualenv
         Release History
         ===============
         
-        15.0.2 (2016-05-28)
+        15.0.3 (2016-08-05)
         -------------------
         
-        * Copy Tcl/Tk libs on Windows to allow them to run,
-          fixes #93 (PR #888)
+        * Test for given python path actually being an executable *file*, #939
         
-        * Upgrade setuptools to 21.2.1.
+        * Only search for copy actual existing Tcl/Tk directories (PR #937)
         
-        * Upgrade pip to 8.1.2.
+        * Generically search for correct Tcl/Tk version (PR #926, PR #933)
         
+        * Upgrade setuptools to 22.0.5
         
-        15.0.1 (2016-03-17)
+        15.0.2 (2016-05-28)
         -------------------
         
-        * Print error message when DEST_DIR exists and is a file
+        * Copy Tcl/Tk libs on Windows to allow them to run,
+          fixes #93 (PR #888)
         
-        * Upgrade setuptools to 20.3
+        * Upgrade setuptools to 21.2.1.
         
-        * Upgrade pip to 8.1.1.
+        * Upgrade pip to 8.1.2.
         
         
         `Full Changelog <https://virtualenv.pypa.io/en/latest/changes.html>`_.
diff --git a/docs/changes.rst b/docs/changes.rst
index 3622b4c..ac11113 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -1,6 +1,17 @@
 Release History
 ===============
 
+15.0.3 (2016-08-05)
+-------------------
+
+* Test for given python path actually being an executable *file*, :issue:`939`
+
+* Only search for copy actual existing Tcl/Tk directories (:pull:`937`)
+
+* Generically search for correct Tcl/Tk version (:pull:`926`, :pull:`933`)
+
+* Upgrade setuptools to 22.0.5
+
 15.0.2 (2016-05-28)
 -------------------
 
diff --git a/tests/test_virtualenv.py b/tests/test_virtualenv.py
index 756cde9..ce45ede 100644
--- a/tests/test_virtualenv.py
+++ b/tests/test_virtualenv.py
@@ -25,6 +25,7 @@ def test_resolve_interpreter_with_absolute_path(mock_exists):
     exe = virtualenv.resolve_interpreter(test_abs_path)
 
     assert exe == test_abs_path, "Absolute path should return as is"
+
     mock_exists.assert_called_with(test_abs_path)
     virtualenv.is_executable.assert_called_with(test_abs_path)
 
@@ -96,6 +97,7 @@ def test_cop_update_defaults_with_store_false():
     cop.update_defaults(defaults)
     assert defaults == {'system_site_packages': 0}
 
+
 def test_install_python_bin():
     """Should create the right python executables and links"""
     tmp_virtualenv = tempfile.mkdtemp()
@@ -106,18 +108,18 @@ def test_install_python_bin():
                                   False)
 
         if virtualenv.is_win:
-            required_executables = [ 'python.exe', 'pythonw.exe']
+            required_executables = ['python.exe', 'pythonw.exe']
         else:
             py_exe_no_version = 'python'
             py_exe_version_major = 'python%s' % sys.version_info[0]
             py_exe_version_major_minor = 'python%s.%s' % (
                 sys.version_info[0], sys.version_info[1])
-            required_executables = [ py_exe_no_version, py_exe_version_major,
-                                     py_exe_version_major_minor ]
+            required_executables = [py_exe_no_version, py_exe_version_major,
+                                    py_exe_version_major_minor]
 
         for pth in required_executables:
-            assert os.path.exists(os.path.join(bin_dir, pth)), ("%s should "
-                            "exist in bin_dir" % pth)
+            assert os.path.exists(os.path.join(bin_dir, pth)), \
+                   ("%s should exist in bin_dir" % pth)
     finally:
         shutil.rmtree(tmp_virtualenv)
 
diff --git a/virtualenv.egg-info/PKG-INFO b/virtualenv.egg-info/PKG-INFO
index fe3d773..75c8a96 100644
--- a/virtualenv.egg-info/PKG-INFO
+++ b/virtualenv.egg-info/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: virtualenv
-Version: 15.0.2
+Version: 15.0.3
 Summary: Virtual Python Environment builder
 Home-page: https://virtualenv.pypa.io/
 Author: Jannis Leidel, Carl Meyer and Brian Rosner
@@ -47,25 +47,26 @@ Description: Virtualenv
         Release History
         ===============
         
-        15.0.2 (2016-05-28)
+        15.0.3 (2016-08-05)
         -------------------
         
-        * Copy Tcl/Tk libs on Windows to allow them to run,
-          fixes #93 (PR #888)
+        * Test for given python path actually being an executable *file*, #939
         
-        * Upgrade setuptools to 21.2.1.
+        * Only search for copy actual existing Tcl/Tk directories (PR #937)
         
-        * Upgrade pip to 8.1.2.
+        * Generically search for correct Tcl/Tk version (PR #926, PR #933)
         
+        * Upgrade setuptools to 22.0.5
         
-        15.0.1 (2016-03-17)
+        15.0.2 (2016-05-28)
         -------------------
         
-        * Print error message when DEST_DIR exists and is a file
+        * Copy Tcl/Tk libs on Windows to allow them to run,
+          fixes #93 (PR #888)
         
-        * Upgrade setuptools to 20.3
+        * Upgrade setuptools to 21.2.1.
         
-        * Upgrade pip to 8.1.1.
+        * Upgrade pip to 8.1.2.
         
         
         `Full Changelog <https://virtualenv.pypa.io/en/latest/changes.html>`_.
diff --git a/virtualenv.egg-info/SOURCES.txt b/virtualenv.egg-info/SOURCES.txt
index 18ebd31..25b9437 100644
--- a/virtualenv.egg-info/SOURCES.txt
+++ b/virtualenv.egg-info/SOURCES.txt
@@ -41,5 +41,5 @@ virtualenv_embedded/site.py
 virtualenv_support/__init__.py
 virtualenv_support/argparse-1.4.0-py2.py3-none-any.whl
 virtualenv_support/pip-8.1.2-py2.py3-none-any.whl
-virtualenv_support/setuptools-21.2.1-py2.py3-none-any.whl
+virtualenv_support/setuptools-22.0.5-py2.py3-none-any.whl
 virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl
\ No newline at end of file
diff --git a/virtualenv.py b/virtualenv.py
index fb9337f..14706b0 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -36,7 +36,7 @@ try:
 except ImportError:
     import configparser as ConfigParser
 
-__version__ = "15.0.2"
+__version__ = "15.0.3"
 virtualenv_version = __version__  # legacy
 
 if sys.version_info < (2, 6):
@@ -1067,14 +1067,14 @@ def copy_required_modules(dst_prefix, symlink):
 
 def copy_tcltk(src, dest, symlink):
     """ copy tcl/tk libraries on Windows (issue #93) """
-    if majver == 2:
-        libver = '8.5'
-    else:
-        libver = '8.6'
-    for name in ['tcl', 'tk']:
-        srcdir = src + '/tcl/' + name + libver
-        dstdir = dest + '/tcl/' + name + libver
-        copyfileordir(srcdir, dstdir, symlink)
+    for libversion in '8.5', '8.6':
+        for libname in 'tcl', 'tk':
+            srcdir = join(src, 'tcl', libname + libversion)
+            destdir = join(dest, 'tcl', libname + libversion)
+            # Only copy the dirs from the above combinations that exist
+            if os.path.exists(srcdir) and not os.path.exists(destdir):
+                copyfileordir(srcdir, destdir, symlink)
+
 
 def subst_path(prefix_path, prefix, home_dir):
     prefix_path = os.path.normpath(prefix_path)
@@ -1370,12 +1370,6 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, sy
             else:
                 copyfile(py_executable, full_pth, symlink)
 
-    if is_win and ' ' in py_executable:
-        # There's a bug with subprocess on Windows when using a first
-        # argument that has a space in it.  Instead we have to quote
-        # the value:
-        py_executable = '"%s"' % py_executable
-    # NOTE: keep this check as one line, cmd.exe doesn't cope with line breaks
     cmd = [py_executable, '-c', 'import sys;out=sys.stdout;'
         'getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))']
     logger.info('Testing executable with %s %s "%s"' % tuple(cmd))
@@ -1553,6 +1547,7 @@ def resolve_interpreter(exe):
     """
     # If the "executable" is a version number, get the installed executable for
     # that version
+    orig_exe = exe
     python_versions = get_installed_pythons()
     if exe in python_versions:
         exe = python_versions[exe]
@@ -1564,16 +1559,16 @@ def resolve_interpreter(exe):
                 exe = join(path, exe)
                 break
     if not os.path.exists(exe):
-        logger.fatal('The executable %s (from --python=%s) does not exist' % (exe, exe))
+        logger.fatal('The path %s (from --python=%s) does not exist' % (exe, orig_exe))
         raise SystemExit(3)
     if not is_executable(exe):
-        logger.fatal('The executable %s (from --python=%s) is not executable' % (exe, exe))
+        logger.fatal('The path %s (from --python=%s) is not an executable file' % (exe, orig_exe))
         raise SystemExit(3)
     return exe
 
 def is_executable(exe):
     """Checks a file is executable"""
-    return os.access(exe, os.X_OK)
+    return os.path.isfile(exe) and os.access(exe, os.X_OK)
 
 ############################################################
 ## Relocating the environment:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-virtualenv.git



More information about the Python-modules-commits mailing list