Merge lp:~brian.curtin/ubuntuone-windows-installer/skip-setup-commands into lp:ubuntuone-windows-installer

Proposed by Brian Curtin
Status: Merged
Approved by: Brian Curtin
Approved revision: 162
Merged at revision: 163
Proposed branch: lp:~brian.curtin/ubuntuone-windows-installer/skip-setup-commands
Merge into: lp:ubuntuone-windows-installer
Diff against target: 28 lines (+9/-2)
1 file modified
scripts/build_installer.py (+9/-2)
To merge this branch: bzr merge lp:~brian.curtin/ubuntuone-windows-installer/skip-setup-commands
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+146254@code.launchpad.net

Commit message

- Add a --no-setup option to skip the fetch, prepare, and py2exe steps of the setup.py that build_installer.py runs

Description of the change

This change adds a simple --no-setup argument to the build_installer script. The default should still be to run all of the setup.py commands, but while working on the installer part of the script you almost always want to skip the setup commands since doing them once is enough.

To post a comment you must log in.
Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'scripts/build_installer.py'
2--- scripts/build_installer.py 2013-01-31 23:34:29 +0000
3+++ scripts/build_installer.py 2013-02-02 03:40:26 +0000
4@@ -1,6 +1,7 @@
5 from __future__ import print_function
6 from collections import namedtuple
7 from platform import platform
8+import argparse
9 import os
10 import shutil
11 import subprocess
12@@ -92,8 +93,14 @@
13 print("Created", target)
14
15 def main():
16- for cmd in ["fetch", "prepare", "py2exe"]:
17- setup_command(cmd)
18+ parser = argparse.ArgumentParser()
19+ parser.add_argument("--no-setup", help="Skip the setup.py commands",
20+ action="store_false", default=True, dest="do_setup")
21+ args = parser.parse_args()
22+
23+ if args.do_setup:
24+ for cmd in ["fetch", "prepare", "py2exe"]:
25+ setup_command(cmd)
26
27 installer = BRCommand(os.path.join("bin", "builder-cli.exe"),
28 ["build", "ubuntuone.xml"],

Subscribers

People subscribed via source and target branches