diff options
author | Bernát Gábor <bgabor8@bloomberg.net> | 2021-01-07 11:51:13 +0000 |
---|---|---|
committer | Bernát Gábor <bgabor8@bloomberg.net> | 2021-01-07 11:51:13 +0000 |
commit | 9234919ade11baa701859a9e381bd8b3c952e153 (patch) | |
tree | 72aa06b38ad84967d53792fb620cd64931175989 /src | |
parent | 965af75cc48eac5494bdf1d4aac6df43834c853a (diff) | |
download | tox-git-9234919ade11baa701859a9e381bd8b3c952e153.tar.gz |
Fix package env recreate not working
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
Diffstat (limited to 'src')
-rw-r--r-- | src/tox/tox_env/package.py | 7 | ||||
-rw-r--r-- | src/tox/tox_env/python/virtual_env/api.py | 2 |
2 files changed, 8 insertions, 1 deletions
diff --git a/src/tox/tox_env/package.py b/src/tox/tox_env/package.py index f384955d..4bb703fe 100644 --- a/src/tox/tox_env/package.py +++ b/src/tox/tox_env/package.py @@ -12,6 +12,7 @@ from tox.config.sets import ConfigSet from tox.journal import EnvJournal from tox.plugin.impl import impl from tox.report import ToxHandler +from tox.tox_env.errors import Recreate from tox.util.threading import AtomicCounter from .api import ToxEnv @@ -40,6 +41,12 @@ class PackageToxEnv(ToxEnv, ABC): if self.recreate_package: # only recreate if user did not opt out super().clean() + def setup(self) -> None: + try: + super().setup() + except Recreate: + self.recreate_package = True + @impl def tox_add_option(parser: ArgumentParser) -> None: diff --git a/src/tox/tox_env/python/virtual_env/api.py b/src/tox/tox_env/python/virtual_env/api.py index 1c5e5537..dd5692c8 100644 --- a/src/tox/tox_env/python/virtual_env/api.py +++ b/src/tox/tox_env/python/virtual_env/api.py @@ -113,7 +113,7 @@ class VirtualEnv(Python, ABC): @property def base_install_cmd(self) -> List[str]: - return [str(self.creator.exe), "-I", "-m", "pip", "--disable-pip-version-check", "install"] + return [str(self.creator.exe), "-I", "-m", "pip", "install"] def perform_install(self, install_command: Sequence[str], run_id: str) -> Outcome: return self.execute( |