From f1696e0dfa62b1beafd4410d23d81f74fec5e032 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Mon, 20 Jan 2020 13:27:46 +0100 Subject: [PATCH] Added parameter --pip [package_name] --- ogscm/cli.py | 3 +++ ogscm/cli_args.py | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/ogscm/cli.py b/ogscm/cli.py index 2a2980d..079561b 100644 --- a/ogscm/cli.py +++ b/ogscm/cli.py @@ -321,6 +321,9 @@ def main(): # pragma: no cover 'neovim', 'gdb', 'silversearcher-ag', 'ssh-client', 'less' ]) + if args.pip: + Stage0 += pip(packages=args.pip, pip='pip3') + if ogs_version != 'off': mount_args = '' if args.ccache: diff --git a/ogscm/cli_args.py b/ogscm/cli_args.py index f9c8d58..90848b7 100644 --- a/ogscm/cli_args.py +++ b/ogscm/cli_args.py @@ -174,6 +174,12 @@ class Cli_Args(argparse.ArgumentParser): dest='insitu', action='store_true', help='Builds with insitu capabilities') + switches_g.add_argument('--pip', + nargs='*', + type=str, + default=[''], + metavar='package', + help='Install additional Python packages') maint_g = self.add_argument_group('Maintenance') maint_g.add_argument( '--clean', -- GitLab