diff options
author | holger krekel <holger@merlinux.eu> | 2011-07-07 21:42:21 +0200 |
---|---|---|
committer | holger krekel <holger@merlinux.eu> | 2011-07-07 21:42:21 +0200 |
commit | 786c429aa9f0f37affb896fb204160ca26f31628 (patch) | |
tree | 1fe69390a6cd5ce5e11425277b5cef3d8bf787e8 | |
parent | 946aa07d73851fce4146f6287d2e7a9f15d8a7fb (diff) | |
download | tox-git-786c429aa9f0f37affb896fb204160ca26f31628.tar.gz |
fix issue6 - reinstall dependencies (by recreating the whole virtualenv) if installing deps failed
-rw-r--r-- | CHANGELOG.txt | 1 | ||||
-rw-r--r-- | setup.py | 4 | ||||
-rw-r--r-- | tests/test_venv.py | 2 | ||||
-rw-r--r-- | tox/__init__.py | 2 | ||||
-rw-r--r-- | tox/_venv.py | 2 | ||||
-rw-r--r-- | toxbootstrap.py | 2 |
6 files changed, 8 insertions, 5 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 109ee168..99f5ec50 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,7 @@ 1.1dev ----------------- +- fix issue6 - recreate virtualenv if installing dependencies failed - fix issue3 - fix example on frontpage - fixed/enhanced: except for initial install always call use "-U --no-deps" for installing the sdist package to ensure that a package @@ -32,7 +32,7 @@ def main(): description='virtualenv-based automation of test activities', long_description=long_description, url='http://codespeak.net/tox', - version='1.1.dev2', + version='1.1.dev3', license='GPLv2 or later', platforms=['unix', 'linux', 'osx', 'cygwin', 'win32'], author='holger krekel', @@ -56,4 +56,4 @@ def main(): ) if __name__ == '__main__': - main() + main()
\ No newline at end of file diff --git a/tests/test_venv.py b/tests/test_venv.py index dd4ef339..3af571db 100644 --- a/tests/test_venv.py +++ b/tests/test_venv.py @@ -74,6 +74,7 @@ def test_create(monkeypatch, mocksession, newconfig): assert venv.getcommandpath("easy_install") interp = venv._getliveconfig().python assert interp == venv.getconfigexecutable() + assert venv.path_config.check(exists=False) def test_create_distribute(monkeypatch, mocksession, newconfig): config = newconfig([], """ @@ -301,6 +302,7 @@ class TestCreationConfig: venv = VirtualEnv(envconfig, session=mocksession) cconfig = venv._getliveconfig() venv.update() + assert venv.path_config.check() assert mocksession._pcalls args1 = map(str, mocksession._pcalls[0].args) assert 'virtualenv' in " ".join(args1) diff --git a/tox/__init__.py b/tox/__init__.py index 181c27d0..006619b8 100644 --- a/tox/__init__.py +++ b/tox/__init__.py @@ -1,5 +1,5 @@ # -__version__ = '1.1.dev2' +__version__ = '1.1.dev3' class exception: class Error(Exception): diff --git a/tox/_venv.py b/tox/_venv.py index 7633ab36..390093cb 100644 --- a/tox/_venv.py +++ b/tox/_venv.py @@ -104,6 +104,7 @@ class VirtualEnv(object): except tox.exception.InvocationError: v = sys.exc_info()[1] return "could not install deps %s" %(self.envconfig.deps,) + self._getliveconfig().writeconfig(self.path_config) def _getliveconfig(self): python = self.getconfigexecutable() @@ -175,7 +176,6 @@ class VirtualEnv(object): # self.easy_install(["-U", "distribute"]) finally: old.chdir() - self._getliveconfig().writeconfig(self.path_config) self.just_created = True def install_sdist(self, sdistpath): diff --git a/toxbootstrap.py b/toxbootstrap.py index e869ae92..0fd43b13 100644 --- a/toxbootstrap.py +++ b/toxbootstrap.py @@ -58,7 +58,7 @@ ToDo """ -__version__ = '1.1.dev2' +__version__ = '1.1.dev3' import sys import os |