diff options
| author | holger krekel <holger@merlinux.eu> | 2013-03-19 12:44:50 +0100 |
|---|---|---|
| committer | holger krekel <holger@merlinux.eu> | 2013-03-19 12:44:50 +0100 |
| commit | 4a82e4270f3f8f4ce8d5a98f24154dadd5d822b4 (patch) | |
| tree | da1b47ebbc750d53fe0fcc542582608dd8628375 | |
| parent | 2eae8ab2b22d6f33293aeb4452e8a9c08ae567a6 (diff) | |
| download | tox-4a82e4270f3f8f4ce8d5a98f24154dadd5d822b4.tar.gz | |
use --setuptools or --distribute option for virtualenv creation
depending on config variable
| -rwxr-xr-x | CHANGELOG | 8 | ||||
| -rw-r--r-- | setup.py | 4 | ||||
| -rw-r--r-- | tests/test_venv.py | 1 | ||||
| -rw-r--r-- | tox/__init__.py | 2 | ||||
| -rw-r--r-- | tox/_venv.py | 6 |
5 files changed, 16 insertions, 5 deletions
@@ -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 ----------------- @@ -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": |
