Skip to content

Commit

Permalink
Add submit argument to allow skipping virtualenv requirement install (#…
Browse files Browse the repository at this point in the history
…421)

* Add submit argument to allow skipping virtualenv requirement install

* Revert "Add submit argument to allow skipping virtualenv requirement install"

This reverts commit 3dc873e.

* Switch venv options to be user-overwritable

Instead of using only `env_config`, we use the resolved options
which take into account options overwritten via CLI.
  • Loading branch information
pkatseas authored and dan-blanchard committed Apr 10, 2018
1 parent 7a5aa66 commit 8500325
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions streamparse/cli/submit.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,25 +157,25 @@ def submit_topology(name=None, env_name=None, options=None, force=False,
warn('Ignoring local_jar_path because given remote_jar_path')
local_jar_path = None

# Check if we need to maintain virtualenv during the process
use_venv = env_config.get('use_virtualenv', True)

# Check if user wants to install virtualenv during the process
install_venv = env_config.get('install_virtualenv', use_venv)

# Setup the fabric env dictionary
activate_env(env_name)

# Handle option conflicts
options = resolve_options(options, env_config, topology_class,
override_name)

# Check if we need to maintain virtualenv during the process
use_venv = options.get('use_virtualenv', True)

# Check if user wants to install virtualenv during the process
install_venv = options.get('install_virtualenv', use_venv)

# Run pre_submit actions provided by project
_pre_submit_hooks(override_name, env_name, env_config, options)

# If using virtualenv, set it up, and make sure paths are correct in specs
if use_venv:
virtualenv_name = env_config.get('virtualenv_name', override_name)
virtualenv_name = options.get('virtualenv_name', override_name)
if install_venv:
create_or_update_virtualenvs(env_name, name, options,
virtualenv_name=virtualenv_name,
Expand Down

0 comments on commit 8500325

Please sign in to comment.