Add an option to skip extensions installation.

This commit is contained in:
Antoine Nguyen
2015-03-11 16:28:04 +01:00
parent 5538060c97
commit a5775e0fbb
2 changed files with 7 additions and 2 deletions
+5 -1
View File
@@ -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(
+2 -1
View File
@@ -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)