summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonald Stufft <donald@stufft.io>2016-02-07 14:43:45 -0500
committerDonald Stufft <donald@stufft.io>2016-02-07 14:43:45 -0500
commitfd5d16bb8dcb2024debe5e88b9b60a04ff39a3b8 (patch)
tree4111544a9799d219647e2644d731125a3f40835d
parent171734bbb59a809c006aa760fb386465759a5bf1 (diff)
parent7a9dae48433950ac4d659aabba19c686d6d690c8 (diff)
downloadvirtualenv-14.0.6.tar.gz
Merge branch 'develop'14.0.6
-rw-r--r--appveyor.yml25
-rw-r--r--docs/changes.rst12
-rw-r--r--tests/test_cmdline.py44
-rw-r--r--tox.ini3
-rwxr-xr-xvirtualenv.py64
-rw-r--r--virtualenv_support/setuptools-20.0-py2.py3-none-any.whl (renamed from virtualenv_support/setuptools-19.6.2-py2.py3-none-any.whl)bin472181 -> 472174 bytes
-rw-r--r--virtualenv_support/wheel-0.26.0-py2.py3-none-any.whlbin63454 -> 0 bytes
-rw-r--r--virtualenv_support/wheel-0.29.0-py2.py3-none-any.whlbin0 -> 66878 bytes
8 files changed, 123 insertions, 25 deletions
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 0000000..0d7ed7a
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,25 @@
+environment:
+
+ matrix:
+ # For Python versions available on Appveyor, see
+ # http://www.appveyor.com/docs/installed-software#python
+
+ - PYTHON: "C:\\Python26"
+ - PYTHON: "C:\\Python27"
+ - PYTHON: "C:\\Python33"
+ - PYTHON: "C:\\Python34"
+ - PYTHON: "C:\\Python35"
+ - PYTHON: "C:\\Python26-x64"
+ - PYTHON: "C:\\Python27-x64"
+ - PYTHON: "C:\\Python33-x64"
+ - PYTHON: "C:\\Python34-x64"
+ - PYTHON: "C:\\Python35-x64"
+
+install:
+ # We need tox installed for the tests
+ - "%PYTHON%\\Scripts\\pip.exe install tox"
+
+build: off
+
+test_script:
+ - "%PYTHON%\\Scripts\\tox.exe -e py"
diff --git a/docs/changes.rst b/docs/changes.rst
index 1c1ce65..e2a027b 100644
--- a/docs/changes.rst
+++ b/docs/changes.rst
@@ -1,11 +1,23 @@
Release History
===============
+14.0.6 (2016-02-07)
+-------------------
+
+* Upgrade setuptools to 20.0
+
+* Upgrade wheel to 0.29.0
+
+* Fix an error where virtualenv didn't pass in a working ssl certificate for
+ pip, causing "weird" errors related to ssl.
+
+
14.0.5 (2016-02-01)
-------------------
* Homogenize drive letter casing for both prefixes and filenames. :issue:`858`
+
14.0.4 (2016-01-31)
-------------------
diff --git a/tests/test_cmdline.py b/tests/test_cmdline.py
new file mode 100644
index 0000000..9682ef0
--- /dev/null
+++ b/tests/test_cmdline.py
@@ -0,0 +1,44 @@
+import sys
+import subprocess
+import virtualenv
+import pytest
+
+VIRTUALENV_SCRIPT = virtualenv.__file__
+
+def test_commandline_basic(tmpdir):
+ """Simple command line usage should work"""
+ subprocess.check_call([
+ sys.executable,
+ VIRTUALENV_SCRIPT,
+ str(tmpdir.join('venv'))
+ ])
+
+def test_commandline_explicit_interp(tmpdir):
+ """Specifying the Python interpreter should work"""
+ subprocess.check_call([
+ sys.executable,
+ VIRTUALENV_SCRIPT,
+ '-p', sys.executable,
+ str(tmpdir.join('venv'))
+ ])
+
+# The registry lookups to support the abbreviated "-p 3.5" form of specifying
+# a Python interpreter on Windows don't seem to work with Python 3.5. The
+# registry layout is not well documented, and it's not clear that the feature
+# is sufficiently widely used to be worth fixing.
+# See https://github.com/pypa/virtualenv/issues/864
+@pytest.mark.skipif("sys.platform == 'win32' and sys.version_info[:2] >= (3,5)")
+def test_commandline_abbrev_interp(tmpdir):
+ """Specifying abbreviated forms of the Python interpreter should work"""
+ if sys.platform == 'win32':
+ fmt = '%s.%s'
+ else:
+ fmt = 'python%s.%s'
+ abbrev = fmt % (sys.version_info[0], sys.version_info[1])
+ subprocess.check_call([
+ sys.executable,
+ VIRTUALENV_SCRIPT,
+ '-p', abbrev,
+ str(tmpdir.join('venv'))
+ ])
+
diff --git a/tox.ini b/tox.ini
index e865b2d..e9f1df6 100644
--- a/tox.ini
+++ b/tox.ini
@@ -10,9 +10,6 @@ deps =
pytest
commands =
py.test
- python virtualenv.py {envtmpdir}/venv
- python virtualenv.py -p {envname} {envtmpdir}/{envname}
- python virtualenv.py --python={envpython} {envtmpdir}/{envname}-fullpath
# Creating a python3 venv with a python2-based virtualenv
[testenv:crosspython2]
diff --git a/virtualenv.py b/virtualenv.py
index c669b36..0b4a94d 100755
--- a/virtualenv.py
+++ b/virtualenv.py
@@ -25,6 +25,8 @@ import glob
import distutils.sysconfig
import struct
import subprocess
+import pkgutil
+import tempfile
from distutils.util import strtobool
from os.path import join
@@ -33,7 +35,7 @@ try:
except ImportError:
import configparser as ConfigParser
-__version__ = "14.0.5"
+__version__ = "14.0.6"
virtualenv_version = __version__ # legacy
if sys.version_info < (2, 6):
@@ -837,31 +839,49 @@ def install_wheel(project_names, py_executable, search_dirs=None,
return urljoin('file:', pathname2url(os.path.abspath(p)))
findlinks = ' '.join(space_path2url(d) for d in search_dirs)
- 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.path = pythonpath.split(os.pathsep) + sys.path
+ cert_data = pkgutil.get_data("pip._vendor.requests", "cacert.pem")
- if not download:
- env["PIP_NO_INDEX"] = "1"
+ 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:
- call_subprocess(cmd, show_stdout=False, extra_env=env)
+ 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",
+ }
+
+ if not download:
+ env["PIP_NO_INDEX"] = "1"
+
+ if cert_file is not None:
+ env["PIP_CERT"] = cert_file.name
+
+ try:
+ call_subprocess(cmd, show_stdout=False, extra_env=env)
+ finally:
+ logger.indent -= 2
+ logger.end_progress()
finally:
- logger.indent -= 2
- logger.end_progress()
+ if cert_file is not None:
+ os.remove(cert_file.name)
+
def create_environment(home_dir, site_packages=False, clear=False,
unzip_setuptools=False,
diff --git a/virtualenv_support/setuptools-19.6.2-py2.py3-none-any.whl b/virtualenv_support/setuptools-20.0-py2.py3-none-any.whl
index ecfc017..fb13052 100644
--- a/virtualenv_support/setuptools-19.6.2-py2.py3-none-any.whl
+++ b/virtualenv_support/setuptools-20.0-py2.py3-none-any.whl
Binary files differ
diff --git a/virtualenv_support/wheel-0.26.0-py2.py3-none-any.whl b/virtualenv_support/wheel-0.26.0-py2.py3-none-any.whl
deleted file mode 100644
index ac025cb..0000000
--- a/virtualenv_support/wheel-0.26.0-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl b/virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl
new file mode 100644
index 0000000..506d5e5
--- /dev/null
+++ b/virtualenv_support/wheel-0.29.0-py2.py3-none-any.whl
Binary files differ