Commits

holger krekel committed 941b646

fix issue6 - reinstall dependencies (by recreating the whole virtualenv) if installing deps failed

  • Participants
  • Parent commits 38c8c79

Comments (0)

Files changed (6)

 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
         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',
     )
 
 if __name__ == '__main__':
-    main()
+    main()

tests/test_venv.py

         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([], """
         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)
 #
-__version__ = '1.1.dev2'
+__version__ = '1.1.dev3'
 
 class exception:
     class Error(Exception):
         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()
             #    self.easy_install(["-U", "distribute"])
         finally:
             old.chdir()
-        self._getliveconfig().writeconfig(self.path_config)
         self.just_created = True
 
     def install_sdist(self, sdistpath):
 
 """
 
-__version__ = '1.1.dev2'
+__version__ = '1.1.dev3'
 
 import sys
 import os