Hello community,
here is the log from the commit of package python3-virtualenv for
openSUSE:Factory checked in at 2016-09-09 10:14:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python3-virtualenv (Old)
and /work/SRC/openSUSE:Factory/.python3-virtualenv.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python3-virtualenv"
Changes:
--------
---
/work/SRC/openSUSE:Factory/python3-virtualenv/python3-virtualenv-doc.changes
2016-02-18 12:35:21.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-virtualenv.new/python3-virtualenv-doc.changes
2016-09-09 10:14:41.000000000 +0200
@@ -1,0 +2,47 @@
+Sat Aug 6 02:44:02 UTC 2016 - [email protected]
+
+- update to version 15.0.3:
+ * Test for given python path actually being an executable file, #939
+ * Only search for copy actual existing Tcl/Tk directories (PR #937)
+ * Generically search for correct Tcl/Tk version (PR #926, PR #933)
+ * Upgrade setuptools to 22.0.5
+
+-------------------------------------------------------------------
+Sat May 28 19:44:47 UTC 2016 - [email protected]
+
+- specfile:
+ * fixed source url
+
+- update to version 15.0.2:
+ * Copy Tcl/Tk libs on Windows to allow them to run, fixes #93 (PR
+ #888)
+ * Upgrade setuptools to 21.2.1.
+ * Upgrade pip to 8.1.2.
+
+-------------------------------------------------------------------
+Sun May 8 07:07:25 UTC 2016 - [email protected]
+
+- specfile:
+ * updated source url to files.pythonhosted.org
+
+-------------------------------------------------------------------
+Thu Mar 17 16:43:52 UTC 2016 - [email protected]
+
+- update to version 15.0.1:
+ * Print error message when DEST_DIR exists and is a file
+ * Upgrade setuptools to 20.3
+ * Upgrade pip to 8.1.1.
+
+-------------------------------------------------------------------
+Sun Mar 6 02:30:27 UTC 2016 - [email protected]
+
+- update to version 15.0.0:
+ * Remove the virtualenv-N.N script from the package; this can no
+ longer be correctly created from a wheel installation. Resolves
+ :issue:`851`, :issue:`692`
+ * Remove accidental runtime dependency on pip by extracting
+ certificate in the subprocess.
+ * Upgrade setuptools 20.2.2.
+ * Upgrade pip to 8.1.0.
+
+-------------------------------------------------------------------
--- /work/SRC/openSUSE:Factory/python3-virtualenv/python3-virtualenv.changes
2016-02-18 12:35:21.000000000 +0100
+++
/work/SRC/openSUSE:Factory/.python3-virtualenv.new/python3-virtualenv.changes
2016-09-09 10:14:43.000000000 +0200
@@ -1,0 +2,47 @@
+Sat Aug 6 02:44:02 UTC 2016 - [email protected]
+
+- update to version 15.0.3:
+ * Test for given python path actually being an executable file, #939
+ * Only search for copy actual existing Tcl/Tk directories (PR #937)
+ * Generically search for correct Tcl/Tk version (PR #926, PR #933)
+ * Upgrade setuptools to 22.0.5
+
+-------------------------------------------------------------------
+Sat May 28 19:44:47 UTC 2016 - [email protected]
+
+- update to version 15.0.2:
+ * Copy Tcl/Tk libs on Windows to allow them to run, fixes #93 (PR
+ #888)
+ * Upgrade setuptools to 21.2.1.
+ * Upgrade pip to 8.1.2.
+
+-------------------------------------------------------------------
+Sun May 8 07:07:23 UTC 2016 - [email protected]
+
+- specfile:
+ * updated source url to files.pythonhosted.org
+
+-------------------------------------------------------------------
+Thu Mar 17 16:43:52 UTC 2016 - [email protected]
+
+- update to version 15.0.1:
+ * Print error message when DEST_DIR exists and is a file
+ * Upgrade setuptools to 20.3
+ * Upgrade pip to 8.1.1.
+
+-------------------------------------------------------------------
+Sun Mar 6 02:30:27 UTC 2016 - [email protected]
+
+- specfile:
+ * fixed update alternatives
+
+- update to version 15.0.0:
+ * Remove the virtualenv-N.N script from the package; this can no
+ longer be correctly created from a wheel installation. Resolves
+ :issue:`851`, :issue:`692`
+ * Remove accidental runtime dependency on pip by extracting
+ certificate in the subprocess.
+ * Upgrade setuptools 20.2.2.
+ * Upgrade pip to 8.1.0.
+
+-------------------------------------------------------------------
Old:
----
virtualenv-14.0.6.tar.gz
New:
----
virtualenv-15.0.3.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python3-virtualenv-doc.spec ++++++
--- /var/tmp/diff_new_pack.q2y2xq/_old 2016-09-09 10:14:46.000000000 +0200
+++ /var/tmp/diff_new_pack.q2y2xq/_new 2016-09-09 10:14:46.000000000 +0200
@@ -17,13 +17,13 @@
Name: python3-virtualenv-doc
-Version: 14.0.6
+Version: 15.0.3
Release: 0
Url: http://www.virtualenv.org/
Summary: Documentation for python3-virtualenv
License: MIT
Group: Development/Languages/Python
-Source:
https://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
+Source:
https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3-devel
# Documentation requirements
++++++ python3-virtualenv.spec ++++++
--- /var/tmp/diff_new_pack.q2y2xq/_old 2016-09-09 10:14:46.000000000 +0200
+++ /var/tmp/diff_new_pack.q2y2xq/_new 2016-09-09 10:14:46.000000000 +0200
@@ -17,13 +17,13 @@
Name: python3-virtualenv
-Version: 14.0.6
+Version: 15.0.3
Release: 0
Url: http://www.virtualenv.org/
Summary: Virtual Python Environment builder
License: MIT
Group: Development/Languages/Python
-Source:
https://pypi.python.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
+Source:
https://files.pythonhosted.org/packages/source/v/virtualenv/virtualenv-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: python3-devel
BuildRequires: python3-setuptools
@@ -67,14 +67,11 @@
%install
python3 setup.py install --prefix=%{_prefix} --root=%{buildroot}
-# Remove script copy and replace with symlink to please u-a:
-rm %{buildroot}%{_bindir}/virtualenv
-ln -s %{_bindir}/virtualenv-%{py3_ver} %{buildroot}%{_bindir}/virtualenv
-
-%pre
-# Since /usr/bin/virtualenv became ghosted to be used with
update-alternatives, we have to
-# get rid of the old binary resulting from the non-update-alternativies-ified
package:
-[ -h %{_bindir}/virtualenv ] || rm -f %{_bindir}/virtualenv
+# create update-alternatives
+mkdir -p %{buildroot}%{_sysconfdir}/alternatives
+mv %{buildroot}%{_bindir}/virtualenv
%{buildroot}%{_bindir}/virtualenv-%{py3_ver}
+ln -s -f %{_sysconfdir}/alternatives/virtualenv
%{buildroot}%{_bindir}/virtualenv
+touch %{buildroot}%{_sysconfdir}/alternatives/virtualenv
%post
update-alternatives \
@@ -88,14 +85,12 @@
%files
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
-%ghost %{_bindir}/virtualenv
+%{_bindir}/virtualenv
%{_bindir}/virtualenv-%{py3_ver}
+%ghost %{_sysconfdir}/alternatives/virtualenv
%{python3_sitelib}/virtualenv-%{version}-py%{py3_ver}.egg-info
%{python3_sitelib}/virtualenv.py
%{python3_sitelib}/virtualenv_support
%{python3_sitelib}/__pycache__/virtualenv.*
-%if 0%{?suse_version} >= 1230
-%ghost %{_sysconfdir}/alternatives/virtualenv
-%endif
%changelog
++++++ virtualenv-14.0.6.tar.gz -> virtualenv-15.0.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/PKG-INFO
new/virtualenv-15.0.3/PKG-INFO
--- old/virtualenv-14.0.6/PKG-INFO 2016-02-07 20:44:29.000000000 +0100
+++ new/virtualenv-15.0.3/PKG-INFO 2016-08-05 14:44:21.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: virtualenv
-Version: 14.0.6
+Version: 15.0.3
Summary: Virtual Python Environment builder
Home-page: https://virtualenv.pypa.io/
Author: Jannis Leidel, Carl Meyer and Brian Rosner
@@ -47,21 +47,26 @@
Release History
===============
- 14.0.6 (2016-02-07)
+ 15.0.3 (2016-08-05)
-------------------
- * Upgrade setuptools to 20.0
+ * Test for given python path actually being an executable *file*, #939
- * Upgrade wheel to 0.29.0
+ * Only search for copy actual existing Tcl/Tk directories (PR #937)
- * Fix an error where virtualenv didn't pass in a working ssl
certificate for
- pip, causing "weird" errors related to ssl.
+ * Generically search for correct Tcl/Tk version (PR #926, PR #933)
+ * Upgrade setuptools to 22.0.5
- 14.0.5 (2016-02-01)
+ 15.0.2 (2016-05-28)
-------------------
- * Homogenize drive letter casing for both prefixes and filenames. #858
+ * Copy Tcl/Tk libs on Windows to allow them to run,
+ fixes #93 (PR #888)
+
+ * Upgrade setuptools to 21.2.1.
+
+ * Upgrade pip to 8.1.2.
`Full Changelog <https://virtualenv.pypa.io/en/latest/changes.html>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/bin/rebuild-script.py
new/virtualenv-15.0.3/bin/rebuild-script.py
--- old/virtualenv-14.0.6/bin/rebuild-script.py 2016-02-07 20:44:24.000000000
+0100
+++ new/virtualenv-15.0.3/bin/rebuild-script.py 2016-08-05 11:30:05.000000000
+0200
@@ -7,7 +7,13 @@
import os
import re
import codecs
-from zlib import crc32
+from zlib import crc32 as _crc32
+
+
+def crc32(data):
+ """Python version idempotent"""
+ return _crc32(data) & 0xffffffff
+
here = os.path.dirname(__file__)
script = os.path.join(here, '..', 'virtualenv.py')
@@ -20,6 +26,7 @@
re.S)
file_template = b'##file %(filename)s\n%(varname)s = convert("""\n%(data)s""")'
+
def rebuild(script_path):
with open(script_path, 'rb') as f:
script_content = f.read()
@@ -42,12 +49,12 @@
new_data = b64.encode(gzip.encode(embedded)[0])[0]
if new_data == data:
- print(' File up to date (crc: %s)' % new_crc)
+ print(' File up to date (crc: %08x)' % new_crc)
parts += [match.group(0)]
continue
# Else: content has changed
crc = crc32(gzip.decode(b64.decode(data)[0])[0])
- print(' Content changed (crc: %s -> %s)' %
+ print(' Content changed (crc: %08x -> %08x)' %
(crc, new_crc))
new_match = file_template % {
b'filename': filename,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/docs/changes.rst
new/virtualenv-15.0.3/docs/changes.rst
--- old/virtualenv-14.0.6/docs/changes.rst 2016-02-07 20:44:24.000000000
+0100
+++ new/virtualenv-15.0.3/docs/changes.rst 2016-08-05 14:22:26.000000000
+0200
@@ -1,6 +1,53 @@
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)
+-------------------
+
+* Copy Tcl/Tk libs on Windows to allow them to run,
+ fixes :issue:`93` (:pull:`888`)
+
+* Upgrade setuptools to 21.2.1.
+
+* Upgrade pip to 8.1.2.
+
+
+15.0.1 (2016-03-17)
+-------------------
+
+* Print error message when DEST_DIR exists and is a file
+
+* Upgrade setuptools to 20.3
+
+* Upgrade pip to 8.1.1.
+
+
+15.0.0 (2016-03-05)
+-------------------
+
+* Remove the `virtualenv-N.N` script from the package; this can no longer be
+ correctly created from a wheel installation.
+ Resolves :issue:`851`, :issue:`692`
+
+* Remove accidental runtime dependency on pip by extracting certificate in the
+ subprocess.
+
+* Upgrade setuptools 20.2.2.
+
+* Upgrade pip to 8.1.0.
+
+
14.0.6 (2016-02-07)
-------------------
@@ -80,7 +127,7 @@
* Make sure not to run a --user install when creating the virtualenv
(:pull:`803`)
-* Remove virtualenv file's path from directory when executing with a new
+* Remove virtualenv.py's path from sys.path when executing with a new
python. Fixes issue :issue:`779`, :issue:`763` (:pull:`805`)
* Remove use of () in .bat files so ``Program Files (x86)`` works :issue:`35`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/docs/userguide.rst
new/virtualenv-15.0.3/docs/userguide.rst
--- old/virtualenv-14.0.6/docs/userguide.rst 2016-02-07 20:44:24.000000000
+0100
+++ new/virtualenv-15.0.3/docs/userguide.rst 2016-08-05 11:30:05.000000000
+0200
@@ -112,7 +112,7 @@
If you select ``[A] Always Run``, the certificate will be added to the
Trusted Publishers of your user account, and will be trusted in this
user's context henceforth. If you select ``[R] Run Once``, the script will
- be run, but you will be prometed on a subsequent invocation. Advanced users
+ be run, but you will be prompted on a subsequent invocation. Advanced users
can add the signer's certificate to the Trusted Publishers of the Computer
account to apply to all users (though this technique is out of scope of
this
document).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/setup.cfg
new/virtualenv-15.0.3/setup.cfg
--- old/virtualenv-14.0.6/setup.cfg 2016-02-07 20:44:29.000000000 +0100
+++ new/virtualenv-15.0.3/setup.cfg 2016-08-05 14:44:21.000000000 +0200
@@ -2,7 +2,7 @@
universal = 1
[egg_info]
+tag_build =
tag_date = 0
tag_svn_revision = 0
-tag_build =
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/setup.py
new/virtualenv-15.0.3/setup.py
--- old/virtualenv-14.0.6/setup.py 2016-02-07 20:44:24.000000000 +0100
+++ new/virtualenv-15.0.3/setup.py 2016-08-05 11:30:05.000000000 +0200
@@ -29,10 +29,7 @@
setup_params = {
'entry_points': {
- 'console_scripts': [
- 'virtualenv=virtualenv:main',
- 'virtualenv-%s.%s=virtualenv:main' % sys.version_info[:2]
- ],
+ 'console_scripts': ['virtualenv=virtualenv:main'],
},
'zip_safe': False,
'cmdclass': {'test': PyTest},
@@ -46,9 +43,7 @@
setup_params = {}
else:
script = 'scripts/virtualenv'
- script_ver = script + '-%s.%s' % sys.version_info[:2]
- shutil.copy(script, script_ver)
- setup_params = {'scripts': [script, script_ver]}
+ setup_params = {'scripts': [script]}
def read_file(*paths):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/tests/test_virtualenv.py
new/virtualenv-15.0.3/tests/test_virtualenv.py
--- old/virtualenv-14.0.6/tests/test_virtualenv.py 2016-02-07
20:44:24.000000000 +0100
+++ new/virtualenv-15.0.3/tests/test_virtualenv.py 2016-08-05
12:32:41.000000000 +0200
@@ -25,6 +25,7 @@
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 @@
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 @@
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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/virtualenv.egg-info/PKG-INFO
new/virtualenv-15.0.3/virtualenv.egg-info/PKG-INFO
--- old/virtualenv-14.0.6/virtualenv.egg-info/PKG-INFO 2016-02-07
20:44:29.000000000 +0100
+++ new/virtualenv-15.0.3/virtualenv.egg-info/PKG-INFO 2016-08-05
14:44:21.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: virtualenv
-Version: 14.0.6
+Version: 15.0.3
Summary: Virtual Python Environment builder
Home-page: https://virtualenv.pypa.io/
Author: Jannis Leidel, Carl Meyer and Brian Rosner
@@ -47,21 +47,26 @@
Release History
===============
- 14.0.6 (2016-02-07)
+ 15.0.3 (2016-08-05)
-------------------
- * Upgrade setuptools to 20.0
+ * Test for given python path actually being an executable *file*, #939
- * Upgrade wheel to 0.29.0
+ * Only search for copy actual existing Tcl/Tk directories (PR #937)
- * Fix an error where virtualenv didn't pass in a working ssl
certificate for
- pip, causing "weird" errors related to ssl.
+ * Generically search for correct Tcl/Tk version (PR #926, PR #933)
+ * Upgrade setuptools to 22.0.5
- 14.0.5 (2016-02-01)
+ 15.0.2 (2016-05-28)
-------------------
- * Homogenize drive letter casing for both prefixes and filenames. #858
+ * Copy Tcl/Tk libs on Windows to allow them to run,
+ fixes #93 (PR #888)
+
+ * Upgrade setuptools to 21.2.1.
+
+ * Upgrade pip to 8.1.2.
`Full Changelog <https://virtualenv.pypa.io/en/latest/changes.html>`_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/virtualenv.egg-info/SOURCES.txt
new/virtualenv-15.0.3/virtualenv.egg-info/SOURCES.txt
--- old/virtualenv-14.0.6/virtualenv.egg-info/SOURCES.txt 2016-02-07
20:44:29.000000000 +0100
+++ new/virtualenv-15.0.3/virtualenv.egg-info/SOURCES.txt 2016-08-05
14:44:21.000000000 +0200
@@ -40,6 +40,6 @@
virtualenv_embedded/site.py
virtualenv_support/__init__.py
virtualenv_support/argparse-1.4.0-py2.py3-none-any.whl
-virtualenv_support/pip-8.0.2-py2.py3-none-any.whl
-virtualenv_support/setuptools-20.0-py2.py3-none-any.whl
+virtualenv_support/pip-8.1.2-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 -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/virtualenv-14.0.6/virtualenv.egg-info/entry_points.txt
new/virtualenv-15.0.3/virtualenv.egg-info/entry_points.txt
--- old/virtualenv-14.0.6/virtualenv.egg-info/entry_points.txt 2016-02-07
20:44:29.000000000 +0100
+++ new/virtualenv-15.0.3/virtualenv.egg-info/entry_points.txt 2016-08-05
14:44:21.000000000 +0200
@@ -1,4 +1,3 @@
[console_scripts]
virtualenv = virtualenv:main
-virtualenv-3.5 = virtualenv:main
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/virtualenv.py
new/virtualenv-15.0.3/virtualenv.py
--- old/virtualenv-14.0.6/virtualenv.py 2016-02-07 20:44:24.000000000 +0100
+++ new/virtualenv-15.0.3/virtualenv.py 2016-08-05 14:22:20.000000000 +0200
@@ -27,6 +27,7 @@
import subprocess
import pkgutil
import tempfile
+import textwrap
from distutils.util import strtobool
from os.path import join
@@ -35,7 +36,7 @@
except ImportError:
import configparser as ConfigParser
-__version__ = "14.0.6"
+__version__ = "15.0.3"
virtualenv_version = __version__ # legacy
if sys.version_info < (2, 6):
@@ -160,6 +161,11 @@
# during the bootstrap
REQUIRED_MODULES.extend(['traceback', 'linecache'])
+ if majver == 3:
+ # _functools is needed to import locale during stdio initialization and
+ # needs to be copied on PyPy because it's not built in
+ REQUIRED_MODULES.append('_functools')
+
class Logger(object):
@@ -296,7 +302,7 @@
else:
return level >= consumer_level
- #@classmethod
+ @classmethod
def level_for_integer(cls, level):
levels = cls.LEVELS
if level < 0:
@@ -305,8 +311,6 @@
return levels[-1]
return levels[level]
- level_for_integer = classmethod(level_for_integer)
-
# create a silent logger just to prevent this from being undefined
# will be overridden with requested verbosity main() is called.
logger = Logger([(Logger.LEVELS[-1], sys.stdout)])
@@ -353,22 +357,19 @@
def writefile(dest, content, overwrite=True):
if not os.path.exists(dest):
logger.info('Writing %s', dest)
- f = open(dest, 'wb')
- f.write(content.encode('utf-8'))
- f.close()
+ with open(dest, 'wb') as f:
+ f.write(content.encode('utf-8'))
return
else:
- f = open(dest, 'rb')
- c = f.read()
- f.close()
+ with open(dest, 'rb') as f:
+ c = f.read()
if c != content.encode("utf-8"):
if not overwrite:
logger.notify('File %s exists with different content; not
overwriting', dest)
return
logger.notify('Overwriting %s with new content', dest)
- f = open(dest, 'wb')
- f.write(content.encode('utf-8'))
- f.close()
+ with open(dest, 'wb') as f:
+ f.write(content.encode('utf-8'))
else:
logger.info('Content %s already in place', dest)
@@ -679,6 +680,11 @@
home_dir = args[0]
+ if os.path.exists(home_dir) and os.path.isfile(home_dir):
+ logger.fatal('ERROR: File already exists and is not a directory.')
+ logger.fatal('Please provide a different path or delete the file.')
+ sys.exit(3)
+
if os.environ.get('WORKING_ENV'):
logger.fatal('ERROR: you cannot run virtualenv while in a workingenv')
logger.fatal('Please deactivate your workingenv, then re-run this
script')
@@ -709,7 +715,7 @@
def call_subprocess(cmd, show_stdout=True,
filter_stdout=None, cwd=None,
raise_on_returncode=True, extra_env=None,
- remove_from_env=None):
+ remove_from_env=None, stdin=None):
cmd_parts = []
for part in cmd:
if len(part) > 45:
@@ -739,7 +745,9 @@
env = None
try:
proc = subprocess.Popen(
- cmd, stderr=subprocess.STDOUT, stdin=None, stdout=stdout,
+ cmd, stderr=subprocess.STDOUT,
+ stdin=None if stdin is None else subprocess.PIPE,
+ stdout=stdout,
cwd=cwd, env=env)
except Exception:
e = sys.exc_info()[1]
@@ -748,6 +756,10 @@
raise
all_output = []
if stdout is not None:
+ if stdin is not None:
+ proc.stdin.write(stdin)
+ proc.stdin.close()
+
stdout = proc.stdout
encoding = sys.getdefaultencoding()
fs_encoding = sys.getfilesystemencoding()
@@ -771,7 +783,7 @@
else:
logger.info(line)
else:
- proc.communicate()
+ proc.communicate(stdin)
proc.wait()
if proc.returncode:
if raise_on_returncode:
@@ -839,48 +851,56 @@
return urljoin('file:', pathname2url(os.path.abspath(p)))
findlinks = ' '.join(space_path2url(d) for d in search_dirs)
- sys.path = pythonpath.split(os.pathsep) + sys.path
- cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
+ SCRIPT = textwrap.dedent("""
+ import sys
+ import pkgutil
+ import tempfile
+ import os
+
+ import pip
+
+ cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
+ if cert_data is not None:
+ cert_file = tempfile.NamedTemporaryFile(delete=False)
+ cert_file.write(cert_data)
+ cert_file.close()
+ else:
+ cert_file = None
- if cert_data is not None:
- cert_file = tempfile.NamedTemporaryFile(delete=False)
- cert_file.write(cert_data)
- cert_file.close()
- else:
- cert_file = None
+ try:
+ args = ["install", "--ignore-installed"]
+ if cert_file is not None:
+ args += ["--cert", cert_file.name]
+ args += sys.argv[1:]
- try:
- cmd = [
- py_executable, '-c',
- 'import sys, pip; sys.exit(pip.main(["install",
"--ignore-installed"] + sys.argv[1:]))',
- ] + project_names
- logger.start_progress('Installing %s...' % (', '.join(project_names)))
- logger.indent += 2
-
- env = {
- "PYTHONPATH": pythonpath,
- "JYTHONPATH": pythonpath, # for Jython < 3.x
- "PIP_FIND_LINKS": findlinks,
- "PIP_USE_WHEEL": "1",
- "PIP_ONLY_BINARY": ":all:",
- "PIP_PRE": "1",
- "PIP_USER": "0",
- }
+ sys.exit(pip.main(args))
+ finally:
+ if cert_file is not None:
+ os.remove(cert_file.name)
+ """).encode("utf8")
- if not download:
- env["PIP_NO_INDEX"] = "1"
+ cmd = [py_executable, '-'] + project_names
+ logger.start_progress('Installing %s...' % (', '.join(project_names)))
+ logger.indent += 2
- if cert_file is not None:
- env["PIP_CERT"] = cert_file.name
+ env = {
+ "PYTHONPATH": pythonpath,
+ "JYTHONPATH": pythonpath, # for Jython < 3.x
+ "PIP_FIND_LINKS": findlinks,
+ "PIP_USE_WHEEL": "1",
+ "PIP_ONLY_BINARY": ":all:",
+ "PIP_PRE": "1",
+ "PIP_USER": "0",
+ }
- try:
- call_subprocess(cmd, show_stdout=False, extra_env=env)
- finally:
- logger.indent -= 2
- logger.end_progress()
+ if not download:
+ env["PIP_NO_INDEX"] = "1"
+
+ try:
+ call_subprocess(cmd, show_stdout=False, extra_env=env, stdin=SCRIPT)
finally:
- if cert_file is not None:
- os.remove(cert_file.name)
+ logger.indent -= 2
+ logger.end_progress()
def create_environment(home_dir, site_packages=False, clear=False,
@@ -1045,6 +1065,16 @@
if os.path.exists(pyfile):
copyfile(pyfile, dst_filename[:-1], symlink)
+def copy_tcltk(src, dest, symlink):
+ """ copy tcl/tk libraries on Windows (issue #93) """
+ 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)
@@ -1101,6 +1131,9 @@
copy_required_modules(home_dir, symlink)
finally:
logger.indent -= 2
+ # ...copy tcl/tk
+ if is_win:
+ copy_tcltk(prefix, home_dir, symlink)
mkdir(join(lib_dir, 'site-packages'))
import site
site_filename = site.__file__
@@ -1337,12 +1370,6 @@
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))
@@ -1520,6 +1547,7 @@
"""
# 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]
@@ -1531,16 +1559,16 @@
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:
@@ -1583,16 +1611,14 @@
if not os.path.isfile(filename):
# ignore subdirs, e.g. .svn ones.
continue
- f = open(filename, 'rb')
- try:
+ lines = None
+ with open(filename, 'rb') as f:
try:
lines = f.read().decode('utf-8').splitlines()
except UnicodeDecodeError:
# This is probably a binary program instead
# of a script, so just ignore it.
continue
- finally:
- f.close()
if not lines:
logger.warn('Script %s is an empty file' % filename)
continue
@@ -1611,9 +1637,9 @@
continue
logger.notify('Making script %s relative' % filename)
script = relative_script([new_shebang] + lines[1:])
- f = open(filename, 'wb')
- f.write('\n'.join(script).encode('utf-8'))
- f.close()
+ with open(filename, 'wb') as f:
+ f.write('\n'.join(script).encode('utf-8'))
+
def relative_script(lines):
"Return a script that'll work in a relocatable environment."
@@ -1660,9 +1686,8 @@
def fixup_pth_file(filename):
lines = []
prev_lines = []
- f = open(filename)
- prev_lines = f.readlines()
- f.close()
+ with open(filename) as f:
+ prev_lines = f.readlines()
for line in prev_lines:
line = line.strip()
if (not line or line.startswith('#') or line.startswith('import ')
@@ -1677,22 +1702,19 @@
logger.info('No changes to .pth file %s' % filename)
return
logger.notify('Making paths in .pth file %s relative' % filename)
- f = open(filename, 'w')
- f.write('\n'.join(lines) + '\n')
- f.close()
+ with open(filename, 'w') as f:
+ f.write('\n'.join(lines) + '\n')
def fixup_egg_link(filename):
- f = open(filename)
- link = f.readline().strip()
- f.close()
+ with open(filename) as f:
+ link = f.readline().strip()
if os.path.abspath(link) != link:
logger.debug('Link in %s already relative' % filename)
return
new_link = make_relative_path(filename, link)
logger.notify('Rewriting link %s in %s as %s' % (link, filename, new_link))
- f = open(filename, 'w')
- f.write(new_link)
- f.close()
+ with open(filename, 'w') as f:
+ f.write(new_link)
def make_relative_path(source, dest, dest_is_directory=True):
"""
@@ -1775,9 +1797,8 @@
filename = __file__
if filename.endswith('.pyc'):
filename = filename[:-1]
- f = codecs.open(filename, 'r', encoding='utf-8')
- content = f.read()
- f.close()
+ with codecs.open(filename, 'r', encoding='utf-8') as f:
+ content = f.read()
py_exe = 'python%s' % python_version
content = (('#!/usr/bin/env %s\n' % py_exe)
+ '## WARNING: This file is generated\n'
@@ -1955,21 +1976,21 @@
##file activate.fish
ACTIVATE_FISH = convert("""
-eJyFVVFv0zAQfs+vONJO3RDNxCsSQoMVrdK2Vl03CSHkesllMXLsYDvZivjx2GmTOG0YfWhV+7u7
-73z33Y1gnTENKeMIeakNPCKUGhP7xcQTbCJ4ZOKcxoZV1GCUMp1t4O0zMxkTQEGVQjicO4dTyIwp
-Ppyfu386Q86jWOZwBhq1ZlK8jYIRXEoQ0jhDYAYSpjA2fBsFQVoKG0UKSLAJB9MEJrMXi6uYMiXl
-KCrIZYJARQIKTakEGAkmQ+tU5ZSDRTAlRY7CRJMA7GdkgRoNSJ74t1BRxegjR12jWAoGbfpTAeGY
-LK4vycN8tb6/uCbLi/VVWGPcx3maPr2AO4VjYB+HMAxAkQT/i/ptfbW4vVrczAZit3eHDNqL13n0
-Ya+w+Tq/uyLL1eJmuSaLh9lqNb/0+IzgznqnAjAvzBa4jG0BNmNXfdJUkxTU2I6xRaKcy+e6VApz
-WVmoTGFTgwslrYdN03ONrbbMN1E/FQ7H7gOP0UxRjV67TPRBjF3naCMV1mSkYk9MUN7F8cODZzsE
-iIHYviIe6n8WeGQxWKuhl+9Xa49uijq7fehXMRxT9VR9f/8jhDcfYSKkSOyxKp22cNIrIk+nzd2b
-Yc7FNpHx8FUn15ZfzXEE98JxZEohx4r6kosCT+R9ZkHQtLmXGYSEeH8JCTvYkcRgXAutp9Rw7Jmf
-E/J5fktuL25m1tMe3vLdjDt9bNxr2sMo2P3C9BccqGeYhqfQITz6XurXaqdf99LF1mT2YJrvzqCu
-5w7dKvV3PzNyOb+7+Hw923dOuB+AX2SxrZs9Lm0xbCH6kmhjUyuWw+7cC7DX8367H3VzDz6oBtty
-tMIeobE21JT6HaRS+TbaoqhbE7rgdGs3xtE4cOF3xo0TfxwsdyRlhUoxuzes18r+Jp88zDx1G+kd
-/HTrr1BY2CeuyfnbQtAcu9j+pOw6cy9X0k3IuoyKCZPC5ESf6MkgHE5tLiSW3Oa+W2NnrQfkGv/h
-7tR5PNFnMBlw4B9NJTxnzKA9fLTT0aXSb5vw7FUKzcTZPddqYHi2T9/axJmEEN3qHncVCuEPaFmq
-uEtpcBj2Z1wjrqGReJBHrY6/go21NA==
+eJyFVVFv2zYQftevuMoOnBS1gr0WGIZ08RADSRw4boBhGGhGOsUcKFIjKbUu9uN7lC2JsrXWDzZM
+fnf38e6+uwlsdsJCLiRCUVkHrwiVxYy+hHqDbQKvQl3z1ImaO0xyYXdbeP9FuJ1QwMFUSnmcP4dL
+2DlXfry+9v/sDqVMUl3AFVi0Vmj1PokmcKtBaecNQTjIhMHUyX0SRXmlKIpWkGEbDuYZzBZfCVcL
+4youUdVQ6AyBqwwMusoocBrcDsmpKbgEQgijVYHKJbMI6DMhoEUHWmbhLdTcCP4q0TYokYNDev5c
+QTxlq/tb9rJcbz7f3LOnm81d3GD8x3uav30FfwrnwCEOYRyAKot+FvXPzd3q8W71sBiJ3d2dMugu
+fsxjCPsBmz+Wz3fsab16eNqw1ctivV7eBnwm8EzeuQIsSrcHqVMqwHbqq8/aarKSO+oYKhKXUn9p
+SmWw0DVBdQ7bBlwaTR62bc+1tpaYb5PhUyScu48CRgvDLQbtMrMnMQ6dY5022JDRRrwJxWUfJwwP
+ge0YIAVGfcUC1M8s8MxitFZjmR9W64hui7p4fBlWMZ5y81b/9cvfMbz7FWZKq4yOTeW1hbNBEWU+
+b+/ejXMu95lOx696uXb8Go4T+Kw8R2EMSqx5KLkkCkQ+ZBZFbZsHL4OYseAvY3EPO5MYTBuhDZQa
+TwPza8Y+LR/Z483Dgjwd4R3f7bTXx9Znkw6T6PAL83/hRD3jNAKFjuEx9NJkq5t+fabLvdvRwbw4
+nEFTzwO6U+q34cvY7fL55tP94tg58XEA/q7LfdPsaUXFoEIMJdHF5iSW0+48CnDQ82G7n3XzAD6q
+Bmo5XuOA0NQ67ir7AXJtQhtLKO7XhC0l39PGOBsHPvzBuHUSjoOnA0ldozGC9gZ5rek3+y3ALHO/
+kT7AP379lQZLSnFDLtwWihfYxw4nZd+ZR7myfkI2ZTRCuRxmF/bCzkbhcElvYamW9PbDGrvqPKC0
++D/uLi/sFcxGjOHylYagZzzsjjhw206RQwrWIwOxS2dnk+40xOjX8bTPegz/gdWVSXuaowNuOLda
+wYyNuRPSTcd/B48Ppeg=
""")
##file activate.csh
@@ -2297,7 +2318,9 @@
do_macho(file, 64, LITTLE_ENDIAN)
assert(len(what) >= len(value))
- do_file(open(path, 'r+b'))
+
+ with open(path, 'r+b') as f:
+ do_file(f)
if __name__ == '__main__':
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/virtualenv-14.0.6/virtualenv_embedded/activate.fish
new/virtualenv-15.0.3/virtualenv_embedded/activate.fish
--- old/virtualenv-14.0.6/virtualenv_embedded/activate.fish 2016-02-07
20:44:24.000000000 +0100
+++ new/virtualenv-15.0.3/virtualenv_embedded/activate.fish 2016-08-05
11:30:05.000000000 +0200
@@ -64,7 +64,7 @@
if test -n "__VIRTUAL_PROMPT__"
printf '%s%s' "__VIRTUAL_PROMPT__" (set_color normal)
else
- printf '%s(%s%s%s) ' (set_color normal) (set_color -o white)
(basename "$VIRTUAL_ENV") (set_color normal)
+ printf '%s(%s) ' (set_color normal) (basename "$VIRTUAL_ENV")
end
# Restore the original $status
Files old/virtualenv-14.0.6/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl
and new/virtualenv-15.0.3/virtualenv_support/pip-8.0.2-py2.py3-none-any.whl
differ
Files old/virtualenv-14.0.6/virtualenv_support/pip-8.1.2-py2.py3-none-any.whl
and new/virtualenv-15.0.3/virtualenv_support/pip-8.1.2-py2.py3-none-any.whl
differ
Files
old/virtualenv-14.0.6/virtualenv_support/setuptools-20.0-py2.py3-none-any.whl
and
new/virtualenv-15.0.3/virtualenv_support/setuptools-20.0-py2.py3-none-any.whl
differ
Files
old/virtualenv-14.0.6/virtualenv_support/setuptools-22.0.5-py2.py3-none-any.whl
and
new/virtualenv-15.0.3/virtualenv_support/setuptools-22.0.5-py2.py3-none-any.whl
differ