Merge lp:~mikemc/ubuntuone-windows-installer/fix-1032301 into lp:ubuntuone-windows-installer

Proposed by Mike McCracken on 2012-08-02
Status: Merged
Approved by: Mike McCracken on 2012-08-02
Approved revision: 128
Merged at revision: 128
Proposed branch: lp:~mikemc/ubuntuone-windows-installer/fix-1032301
Merge into: lp:ubuntuone-windows-installer
Diff against target: 20 lines (+9/-2)
1 file modified
scripts/setup-mac.py (+9/-2)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-windows-installer/fix-1032301
Reviewer Review Type Date Requested Status
Roberto Alsina (community) 2012-08-02 Approve on 2012-08-02
Review via email: mp+117957@code.launchpad.net

Commit Message

- Use glob to find latest installed bzr instead of hardcoding path. (LP: #1032301)

Description of the Change

- Use glob to find latest installed bzr instead of hardcoding path. (LP: #1032301)

To test this, run (buildout-)python setup-mac.py prepare --from-trunk

It should use bzr correctly to put branches into sources/

To post a comment you must log in.
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/setup-mac.py'
2--- scripts/setup-mac.py 2012-07-25 20:02:01 +0000
3+++ scripts/setup-mac.py 2012-08-02 17:38:40 +0000
4@@ -70,9 +70,16 @@
5 # bzr env assumes homebrew install:
6 # This is necessary so we can run setup-mac with the buildout python,
7 # which breaks the paths needed for bzr.
8-BZR_PATH = "/usr/local/Cellar/bazaar/2.5.0/libexec/:/usr/local/bin:/usr/bin"
9+# just grab the latest installed bzr:
10+BZR_PATHS = sorted(glob.glob("/usr/local/Cellar/bazaar/*/libexec/"),
11+ reverse=True)
12+if len(BZR_PATHS) < 1:
13+ print "Could not find bzr in /usr/local/Cellar/bazaar."
14+ sys.exit()
15+
16+BZR_PATH = BZR_PATHS[0] + ":/usr/local/bin:/usr/bin"
17 BZR_ENV = os.environ.copy()
18-BZR_ENV.update(dict(PYTHONPATH="/usr/local/Cellar/bazaar/2.5.0/libexec/",
19+BZR_ENV.update(dict(PYTHONPATH=BZR_PATHS[0],
20 PATH=BZR_PATH))
21
22

Subscribers

People subscribed via source and target branches