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

Proposed by Mike McCracken on 2012-08-02
Status: Superseded
Proposed branch: lp:~mikemc/ubuntuone-windows-installer/fix-1032290
Merge into: lp:ubuntuone-windows-installer
Diff against target: 31 lines (+10/-3)
1 file modified
scripts/setup-mac.py (+10/-3)
To merge this branch: bzr merge lp:~mikemc/ubuntuone-windows-installer/fix-1032290
Reviewer Review Type Date Requested Status
Ubuntu One hackers 2012-08-02 Pending
Review via email: mp+117959@code.launchpad.net

This proposal has been superseded by a proposal from 2012-08-02.

Commit Message

- Fix default sources path (LP: #1032290)

Description of the Change

- Fix default sources path (LP: #1032290)

To test: run python setup-mac.py prepare (using buildout python) from a branch of windows-installer that isn't inside another branch of windows-installer (which is crazy why would anyone do that).

Verify that it finds the sources in devsetup/parts and doesn't blow up.

To post a comment you must log in.

Unmerged revisions

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:55:22 +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
23@@ -180,7 +187,7 @@
24 self.source_dir = 'sources'
25 else:
26 self.source_dir = os.path.join(os.path.dirname(__file__),
27- "../..")
28+ "devsetup", "parts")
29
30 if self.only_prepare is None:
31 # default is to do everything:

Subscribers

People subscribed via source and target branches