summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernát Gábor <bgabor8@bloomberg.net>2021-01-30 13:59:38 +0000
committerGitHub <noreply@github.com>2021-01-30 13:59:38 +0000
commite02bdbd71708321fe6a19308eadbceae1033767e (patch)
treef8139bef0e04b2f85fc333cbb49fdf2854b6e976 /src
parent6d9b2dff59f220f6b3bae1fedcb888fd113bf269 (diff)
downloadtox-git-e02bdbd71708321fe6a19308eadbceae1033767e.tar.gz
Add list_dependencies_command support (#1887)
Signed-off-by: Bernát Gábor <bgabor8@bloomberg.net>
Diffstat (limited to 'src')
-rw-r--r--src/tox/tox_env/python/virtual_env/api.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/tox/tox_env/python/virtual_env/api.py b/src/tox/tox_env/python/virtual_env/api.py
index ac0902cf..e1a75057 100644
--- a/src/tox/tox_env/python/virtual_env/api.py
+++ b/src/tox/tox_env/python/virtual_env/api.py
@@ -67,7 +67,6 @@ class VirtualEnv(Python, ABC):
default=False,
desc="install the latest available pre-release (alpha/beta/rc) of dependencies without a specified version",
)
-
self.conf.add_config(
keys=["install_command"],
of_type=Command,
@@ -75,6 +74,12 @@ class VirtualEnv(Python, ABC):
post_process=self.post_process_install_command,
desc="install the latest available pre-release (alpha/beta/rc) of dependencies without a specified version",
)
+ self.conf.add_config(
+ keys=["list_dependencies_command"],
+ of_type=Command,
+ default=Command(["python", "-m", "pip", "freeze", "--all"]),
+ desc="install the latest available pre-release (alpha/beta/rc) of dependencies without a specified version",
+ )
def post_process_install_command(self, cmd: Command) -> Command:
install_command = cmd.args
@@ -218,9 +223,9 @@ class VirtualEnv(Python, ABC):
)
def get_installed_packages(self) -> List[str]:
- list_command = [self.creator.exe, "-I", "-m", "pip", "freeze", "--all"]
+ cmd: Command = self.conf["list_dependencies_command"]
result = self.execute(
- cmd=list_command,
+ cmd=cmd.args,
stdin=StdinSource.OFF,
run_id="freeze",
show=self.options.verbosity > DEFAULT_VERBOSITY,