diff --git a/modoboa/core/commands/deploy.py b/modoboa/core/commands/deploy.py index 6c426be39..0dfee4d03 100644 --- a/modoboa/core/commands/deploy.py +++ b/modoboa/core/commands/deploy.py @@ -76,6 +76,10 @@ class DeployCommand(Command): '--extensions', type=str, nargs='*', help="The list of extension to deploy" ) + self._parser.add_argument( + '--dont-install-extensions', action='store_true', default=False, + help='Do not install extensions using pip' + ) def _exec_django_command(self, name, cwd, *args): """Run a django command for the freshly created project @@ -196,7 +200,7 @@ class DeployCommand(Command): allowed_host = "localhost" extra_settings = [] - if parsed_args.extensions: + if parsed_args.dont_install_extensions and parsed_args.extensions: extra_settings = self.install_extensions(parsed_args.extensions) bower_components_dir = os.path.realpath( diff --git a/modoboa/lib/test_utils.py b/modoboa/lib/test_utils.py index 5eec2701c..98888069e 100644 --- a/modoboa/lib/test_utils.py +++ b/modoboa/lib/test_utils.py @@ -28,7 +28,8 @@ class TestRunnerMixin(object): ) cmd = ( "modoboa-admin.py deploy --collectstatic " - "--dburl {0} --extensions {1} --domain {2} {3}" + "--dburl {0} --extensions {1} --dont-install-extensions " + "--domain {2} {3}" .format(dburl, self.extension, "localhost", self.projname) ) code, output = exec_cmd(cmd, cwd=self.workdir)