summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorholger krekel <holger@merlinux.eu>2013-03-19 12:44:50 +0100
committerholger krekel <holger@merlinux.eu>2013-03-19 12:44:50 +0100
commit4a82e4270f3f8f4ce8d5a98f24154dadd5d822b4 (patch)
treeda1b47ebbc750d53fe0fcc542582608dd8628375
parent2eae8ab2b22d6f33293aeb4452e8a9c08ae567a6 (diff)
downloadtox-4a82e4270f3f8f4ce8d5a98f24154dadd5d822b4.tar.gz
use --setuptools or --distribute option for virtualenv creation
depending on config variable
-rwxr-xr-xCHANGELOG8
-rw-r--r--setup.py4
-rw-r--r--tests/test_venv.py1
-rw-r--r--tox/__init__.py2
-rw-r--r--tox/_venv.py6
5 files changed, 16 insertions, 5 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 12a8487..5ca6bc7 100755
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,3 +1,11 @@
+1.5.0.dev
+-----------------
+
+- depend on virtualenv-1.9.1
+
+- use either --distribute or --setuptools depending
+ on "distribute" env config
+
1.4.3
-----------------
diff --git a/setup.py b/setup.py
index de3d573..8f2a7ff 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@ class Tox(TestCommand):
def main():
version = sys.version_info[:2]
- install_requires = ['virtualenv>=1.8.4', 'py>=1.4.12', ]
+ install_requires = ['virtualenv>=1.9.1', 'py>=1.4.13', ]
if version < (2, 7) or (3, 0) <= version <= (3, 1):
install_requires += ['argparse']
setup(
@@ -49,7 +49,7 @@ def main():
description='virtualenv-based automation of test activities',
long_description=long_description,
url='http://tox.testrun.org/',
- version='1.4.3',
+ version='1.5.0.dev1',
license='GPLv2 or later',
platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'],
author='holger krekel',
diff --git a/tests/test_venv.py b/tests/test_venv.py
index 099247a..df86206 100644
--- a/tests/test_venv.py
+++ b/tests/test_venv.py
@@ -116,6 +116,7 @@ def test_create_distribute(monkeypatch, mocksession, newconfig):
assert len(l) >= 1
args = l[0].args
assert "--distribute" not in map(str, args)
+ assert "--setuptools" in map(str, args)
def test_create_sitepackages(monkeypatch, mocksession, newconfig):
config = newconfig([], """
diff --git a/tox/__init__.py b/tox/__init__.py
index ea1ea01..07d5f30 100644
--- a/tox/__init__.py
+++ b/tox/__init__.py
@@ -1,5 +1,5 @@
#
-__version__ = '1.4.3'
+__version__ = '1.5.0.dev1'
class exception:
class Error(Exception):
diff --git a/tox/_venv.py b/tox/_venv.py
index c659a5e..daba988 100644
--- a/tox/_venv.py
+++ b/tox/_venv.py
@@ -162,8 +162,10 @@ class VirtualEnv(object):
venvscript = path.rstrip("co")
#venvscript = py.path.local(tox.__file__).dirpath("virtualenv.py")
args = [config_interpreter, venvscript]
- if not self._ispython3() and self.envconfig.distribute:
- args.append('--distribute')
+ if self.envconfig.distribute:
+ args.append("--distribute")
+ else:
+ args.append("--setuptools")
if self.envconfig.sitepackages:
args.append('--system-site-packages')
#if sys.platform == "win32":