From 3c27602e1551d19c0c314c8a56fa726c8a8e5781 Mon Sep 17 00:00:00 2001 From: Dan Blanchard Date: Wed, 5 Dec 2018 16:11:40 -0500 Subject: [PATCH] Make sure we resolve virtualenv options properly (#453) --- streamparse/cli/common.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/streamparse/cli/common.py b/streamparse/cli/common.py index 9488de3f..504e5545 100644 --- a/streamparse/cli/common.py +++ b/streamparse/cli/common.py @@ -251,6 +251,14 @@ def add_workers(parser): ) +VIRTUALENV_OPTIONS = ( + "install_virtualenv", + "use_virtualenv", + "virtualenv_flags", + "virtualenv_root", +) + + def resolve_options( cli_options, env_config, topology_class, topology_name, local_only=False ): @@ -290,6 +298,11 @@ def resolve_options( if isinstance(log_config.get("level"), string_types): storm_options["pystorm.log.level"] = log_config["level"].lower() + # Make sure virtualenv options are present here + for venv_option in VIRTUALENV_OPTIONS: + if venv_option in env_config: + storm_options[venv_option] = env_config[venv_option] + # Override options with topology options storm_options.update(topology_class.config)