Merge lp:~raoul-snyman/brz/1818947-windows-fix into lp:brz/3.0

Proposed by Raoul Snyman on 2019-03-08
Status: Merged
Approved by: Jelmer Vernooij on 2019-03-09
Approved revision: 7306
Merge reported by: The Breezy Bot
Merged at revision: not available
Proposed branch: lp:~raoul-snyman/brz/1818947-windows-fix
Merge into: lp:brz/3.0
Diff against target: 25 lines (+1/-9)
1 file modified
setup.py (+1/-9)
To merge this branch: bzr merge lp:~raoul-snyman/brz/1818947-windows-fix
Reviewer Review Type Date Requested Status
Jelmer Vernooij 2019-03-08 Approve on 2019-03-09
Review via email: mp+364182@code.launchpad.net

Commit message

Refactor some code in setup.py that was used when installing brz on Windows.

To post a comment you must log in.
Jelmer Vernooij (jelmer) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'setup.py'
2--- setup.py 2019-03-04 10:39:09 +0000
3+++ setup.py 2019-03-08 20:58:45 +0000
4@@ -149,8 +149,7 @@
5 script_path = self._quoted_path(os.path.join(scripts_dir,
6 "brz"))
7 python_exe = self._quoted_path(sys.executable)
8- args = self._win_batch_args()
9- batch_str = "@%s %s %s" % (python_exe, script_path, args)
10+ batch_str = "@%s %s %%*" % (python_exe, script_path)
11 batch_path = os.path.join(self.install_dir, "brz.bat")
12 with open(batch_path, "w") as f:
13 f.write(batch_str)
14@@ -164,13 +163,6 @@
15 return '"' + path + '"'
16 else:
17 return path
18-
19- def _win_batch_args(self):
20- from breezy.win32utils import winver
21- if winver == 'Windows NT':
22- return '%*'
23- else:
24- return '%1 %2 %3 %4 %5 %6 %7 %8 %9'
25 #/class my_install_scripts
26
27

Subscribers

People subscribed via source and target branches