From 84b22c3b93f836ce67b91b186346de30af62af8b Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Fri, 5 Dec 2014 12:10:59 +0100 Subject: [PATCH] init_venv: Check dev packages only with --dev --- scripts/init_venv.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/init_venv.py b/scripts/init_venv.py index 9ba3a5aaf..59a71996d 100644 --- a/scripts/init_venv.py +++ b/scripts/init_venv.py @@ -63,7 +63,7 @@ def check_exists(): sys.exit(1) -def get_packages(short=False): +def get_dev_packages(short=False): """Get a list of packages to install. Args: @@ -80,7 +80,7 @@ def get_packages(short=False): def install_dev_packages(): """Install the packages needed for development.""" - for pkg in get_packages(): + for pkg in get_dev_packages(): utils.print_subtitle("Installing {}".format(pkg)) venv_python('-m', 'pip', 'install', pkg) @@ -100,7 +100,8 @@ def test_toolchain(): """Test if imports work properly.""" utils.print_title("Checking toolchain") packages = ['sip', 'PyQt5.QtCore', 'PyQt5.QtWebKit', 'qutebrowser.app'] - packages += get_packages(short=True) + if g_args.dev: + packages += get_dev_packages(short=True) for pkg in packages: print("Importing {}".format(pkg)) venv_python('-c', 'import {}'.format(pkg))