diff options
author | holger krekel <holger@merlinux.eu> | 2013-09-04 14:54:02 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2013-09-04 14:54:02 +0200 |
commit | 42ca139398350d4d61841277a07568e17a6d7b87 (patch) | |
tree | 35822d90ce655e2f72c9aa60e6a410af7aedbda9 | |
parent | 697bc6e8aa4802aa2c2936b8f9cca2c65cc80f7b (diff) | |
download | tox-42ca139398350d4d61841277a07568e17a6d7b87.tar.gz |
fix issue117: python2.5 fix: don't use ``--insecure`` option because
its very existence depends on presence of "ssl". If you
want to support python2.5/pip1.3.1 based test environments you need
to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section.
-rwxr-xr-x | CHANGELOG | 5 | ||||
-rw-r--r-- | doc/config.txt | 7 | ||||
-rw-r--r-- | tests/test_config.py | 2 | ||||
-rw-r--r-- | tox/_config.py | 6 |
4 files changed, 12 insertions, 8 deletions
@@ -15,6 +15,11 @@ - fix test runs on environments without a home directory (in this case we use toxinidir as the homedir) +- fix issue117: python2.5 fix: don't use ``--insecure`` option because + its very existence depends on presence of "ssl". If you + want to support python2.5/pip1.3.1 based test environments you need + to install ssl and/or use PIP_INSECURE=1 through ``setenv``. section. + 1.6.0 ----------------- diff --git a/doc/config.txt b/doc/config.txt index bad9f13..db33373 100644 --- a/doc/config.txt +++ b/doc/config.txt @@ -99,10 +99,11 @@ Complete list of settings that you can put into ``testenv*`` sections: **default on environments using python2.5**:: - pip install --insecure {opts} {packages}`` + pip install {opts} {packages}`` - (this will use pip<1.4 (so no ``--pre`` option) and python2.5 - typically has no SSL support, therefore ``--insecure``). + this will use pip<1.4 which has no ``--pre`` option. Note also + that for python2.5 support you may need to install ssl and/or + use ``setenv = PIP_INSECURE=1`` in a py25 based testenv. .. confval:: whitelist_externals=MULTI-LINE-LIST diff --git a/tests/test_config.py b/tests/test_config.py index 969bbba..34c3797 100644 --- a/tests/test_config.py +++ b/tests/test_config.py @@ -509,7 +509,7 @@ class TestConfigTestEnv: for name in ("x25", "py25-x"): env = config.envconfigs[name] assert env.install_command == \ - "pip install --insecure {opts} {packages}".split() + "pip install {opts} {packages}".split() env = config.envconfigs["py26"] assert env.install_command == \ "pip install --pre {opts} {packages}".split() diff --git a/tox/_config.py b/tox/_config.py index cf16b52..7939797 100644 --- a/tox/_config.py +++ b/tox/_config.py @@ -330,13 +330,11 @@ class parseini: downloadcache = os.environ.get("PIP_DOWNLOAD_CACHE", downloadcache) vc.downloadcache = py.path.local(downloadcache) - # on python 2.5 we can't use "--pre" and we typically - # need to use --insecure for pip commands because python2.5 - # doesn't support SSL + # on pip-1.3.1/python 2.5 we can't use "--pre". pip_default_opts = ["{opts}", "{packages}"] info = vc._basepython_info if info.runnable and info.version_info < (2,6): - pip_default_opts.insert(0, "--insecure") + pass else: pip_default_opts.insert(0, "--pre") vc.install_command = reader.getargv( |