Merge lp:~jameinel/bzr/2.1-remove-win32-build into lp:bzr
- 2.1-remove-win32-build
- Merge into bzr.dev
Status: | Work in progress |
---|---|
Proposed branch: | lp:~jameinel/bzr/2.1-remove-win32-build |
Merge into: | lp:bzr |
Diff against target: |
872 lines 7 files modified
Makefile (+0/-80) tools/win32/bootstrap.py (+0/-77) tools/win32/build_release.py (+0/-207) tools/win32/buildout-templates/bin/build-installer.bat.in (+0/-108) tools/win32/buildout.cfg (+0/-197) tools/win32/ostools.py (+0/-138) tools/win32/run_script.py (+0/-16) |
To merge this branch: | bzr merge lp:~jameinel/bzr/2.1-remove-win32-build |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ian Clatworthy | Approve | ||
Vincent Ladeuil | Approve | ||
Review via email: mp+13848@code.launchpad.net |
Commit message
Description of the change
Ian Clatworthy (ian-clatworthy) wrote : | # |
My understanding is that win32/ostools.py can't be deleted. Please check with bialix for the reasons.
Otherwise, this all looks ok to me.
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Ian Clatworthy wrote:
> Review: Needs Fixing
> My understanding is that win32/ostools.py can't be deleted. Please check with bialix for the reasons.
>
> Otherwise, this all looks ok to me.
I did grep around for it, as I originally wanted to remove *everything*
in that directory.
I see 'ostools.py' used in Makefile and build-installer
Both of which should be using the bzr-windows-
Are you thinking that there is a 3rd-party code out there that is going
to be using our 'ostools.py' file?
(Like scmproj, qbzr, etc.)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr
A2kAoNWvmtfl8wa
=LMk3
-----END PGP SIGNATURE-----
Vincent Ladeuil (vila) wrote : | # |
hmm a patch with only red lines, lovely.
Isn't there some lines you can also delete in setup.py or is it premature ?
Ian Clatworthy (ian-clatworthy) wrote : | # |
> I did grep around for it, as I originally wanted to remove *everything*
> in that directory.
I'm all for that.
> I see 'ostools.py' used in Makefile and build-installer
I can't remember why bialix warned me against removing that file. I suspect it was related to usage in the Makefile. He hasn't been on IRC today when I've been there. I'll email him now about it.
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Review: Approve
> hmm a patch with only red lines, lovely.
>
> Isn't there some lines you can also delete in setup.py or is it premature ?
We still use setup.py from the bzr version (not from
bzr-windows-
away still...
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr
RlQAoJc33MwgFNL
=OTaj
-----END PGP SIGNATURE-----
Alexander Belchenko (bialix) wrote : | # |
> This removes some of the win32 build cruft from the bzr codebase.
> Unfortunately I cannot (yet) remove all of it, because a decent portion of the
> build process still uses the code from here. (Namely we run 'iscc bzr.iss' on
> the file from the bzr source, rather than using that file from bzr-windows-
> installers. This should get fixed.
It's not quite true. When installer is building the actual bzr.iss.cog file copied from bzr-windows-
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Alexander Belchenko wrote:
>> This removes some of the win32 build cruft from the bzr codebase.
>> Unfortunately I cannot (yet) remove all of it, because a decent portion of the
>> build process still uses the code from here. (Namely we run 'iscc bzr.iss' on
>> the file from the bzr source, rather than using that file from bzr-windows-
>> installers. This should get fixed.
>
> It's not quite true. When installer is building the actual bzr.iss.cog file copied from bzr-windows-
>
That is good to hear. Though I know I've run into problems in the past
with the installer looking in the wrong place for files. However, the
more we push on this the better we'll get. :)
I'd really like to overhaul most of the build process, though I don't
think I'll get to that soon.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr
qmcAn0HJc9BV+
=tzX+
-----END PGP SIGNATURE-----
Alexander Belchenko (bialix) wrote : | # |
John, Ian.
I can't say for sure does ostools.py still used by windows-installer process, but I found next lines in build-installer
echo Building the C extensions
cd %TARGET%
%PYTHON% tools/win32/
%PYTHON% setup.py build_ext -i -f %PYTHON_BUILDFLAGS%
@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=
It seems that at least this line rely on the fact that ostools.py present in bzr.dev codebase.
So if you want to remove ostools.py from bzr.dev I suspect you have to fix installer bat file first.
The snippet above taken from revno 46 of bzr+ssh:
Vincent, does babune supposed to catch that sort of build errors? Or it unable to build installer from bzr.dev?
Vincent Ladeuil (vila) wrote : | # |
>>>>> "bialix" == Alexander Belchenko <email address hidden> writes:
<snip/>
bialix> Vincent, does babune supposed to catch that sort of
bialix> build errors? Or it unable to build installer from
bialix> bzr.dev?
babune fails to build from bzr.dev from around the time
bzr-windows-
That is, since bzr.dev is not maintained for the windows
installers anymore, the builds fail, but I understand that to be
expected.
Ian Clatworthy (ian-clatworthy) wrote : | # |
Vincent Ladeuil wrote:
> babune fails to build from bzr.dev from around the time
> bzr-windows-
>
> That is, since bzr.dev is not maintained for the windows
> installers anymore, the builds fail, but I understand that to be
> expected.
Vila,
Can babune be changed to build the windows installer from
bzr-windows-
Ian C.
Vincent Ladeuil (vila) wrote : | # |
>>>>> "Ian" == Ian Clatworthy <email address hidden> writes:
Ian> Vincent Ladeuil wrote:
>> babune fails to build from bzr.dev from around the time
>> bzr-windows-
>>
>> That is, since bzr.dev is not maintained for the windows
>> installers anymore, the builds fail, but I understand that to be
>> expected.
Ian> Vila,
Ian> Can babune be changed to build the windows installer from
Ian> bzr-windows-
Patches welcome !
Or at the minimum tell me what need to be installed on the
master, on the slave and what need to be run on the slave.
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
>>>>>> "Ian" == Ian Clatworthy <email address hidden> writes:
>
> Ian> Vincent Ladeuil wrote:
> >> babune fails to build from bzr.dev from around the time
> >> bzr-windows-
> >>
> >> That is, since bzr.dev is not maintained for the windows
> >> installers anymore, the builds fail, but I understand that to be
> >> expected.
>
> Ian> Vila,
>
> Ian> Can babune be changed to build the windows installer from
> Ian> bzr-windows-
>
> Patches welcome !
>
> Or at the minimum tell me what need to be installed on the
> master, on the slave and what need to be run on the slave.
Generally,
bzr branch lp:bzr-windows-installers
cd bzr-windows-
make PYTHON=
If we want to test the 2.0 series it would be
bzr branch lp:~bzr/bzr-windows-installers/2.0
...
I *think* I've managed to set those up so that automatic updating works.
(Basically by deleting all of the branches before updating, so make sure
you have a shared repo set up. :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAkr
lWQAoLTljvCqWjD
=OGpu
-----END PGP SIGNATURE-----
Ian Clatworthy (ian-clatworthy) wrote : | # |
Let's land this. If there's some fallout in bzr-windows-
Robert Collins (lifeless) wrote : | # |
John, when you get back... this is ready to land according to the reviews.
Vincent Ladeuil (vila) wrote : | # |
Johh, unless you object, I'll land this tomorrow.
John A Meinel (jameinel) wrote : | # |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Vincent Ladeuil wrote:
> Johh, unless you object, I'll land this tomorrow.
I expect this to cause a fair amount of build code fallout. So I want it
to land, but I've sort of been putting it off until I have time to make
sure to get build working.
That said, if we just do it, I'll put build as a priority, so either way. :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAks
Vd4AoI2+
=cKZw
-----END PGP SIGNATURE-----
Vincent Ladeuil (vila) wrote : | # |
Right, I don't want to force your schedule, so I'll put the proposal back into Work In Progress.
Of course you retain the moral right to land it when you see fit :-D
Unmerged revisions
- 4766. By John A Meinel
-
Remove some of the build dependencies from the bzr source tree.
Note that the build process still uses *some* files from the bzr source.
Which is bad (IMO), but the way it is until we get a real overhaul and cleanup.
Preview Diff
1 | === modified file 'Makefile' |
2 | --- Makefile 2009-10-13 15:05:13 +0000 |
3 | +++ Makefile 2009-10-23 15:15:43 +0000 |
4 | @@ -21,11 +21,6 @@ |
5 | ### Core Stuff ### |
6 | |
7 | PYTHON=python |
8 | -PYTHON24=python24 |
9 | -PYTHON25=python25 |
10 | -PYTHON26=python26 |
11 | -BZR_TARGET=release |
12 | -PLUGIN_TARGET=plugin-release |
13 | PYTHON_BUILDFLAGS= |
14 | |
15 | .PHONY: all clean extensions pyflakes api-docs check-nodocs check |
16 | @@ -317,81 +312,6 @@ |
17 | @echo Generating $@ |
18 | @dot -Tpng $< -o$@ || echo "Dot not installed; skipping generation of $@" |
19 | |
20 | - |
21 | -### Windows Support ### |
22 | - |
23 | -# make all the installers completely from scratch, using zc.buildout |
24 | -# to fetch the dependencies |
25 | -# These are files that need to be copied into the build location to boostrap |
26 | -# the build process. |
27 | -# Note that the path is relative to tools/win32 |
28 | -BUILDOUT_FILES := buildout.cfg \ |
29 | - buildout-templates/bin/build-installer.bat.in \ |
30 | - ostools.py bootstrap.py |
31 | - |
32 | -installer-all: |
33 | - @echo Make all the installers from scratch |
34 | - @# Build everything in a separate directory, to avoid cluttering the WT |
35 | - $(PYTHON) tools/win32/ostools.py makedir build-win32 |
36 | - @# cd to tools/win32 so that the relative paths are copied correctly |
37 | - cd tools/win32 && $(PYTHON) ostools.py copytree $(BUILDOUT_FILES) ../../build-win32 |
38 | - @# There seems to be a bug in gf.release.bzr, It doesn't correctly update |
39 | - @# existing release directories, so delete them manually before building |
40 | - @# It means things may be rebuilt that don't need to be, but at least |
41 | - @# it will be correct when they do. |
42 | - cd build-win32 && $(PYTHON) ostools.py remove release */release |
43 | - cd build-win32 && $(PYTHON) bootstrap.py |
44 | - cd build-win32 && bin/buildout |
45 | - cd build-win32 && bin/build-installer.bat $(BZR_TARGET) $(PLUGIN_TARGET) |
46 | - |
47 | - |
48 | -clean-installer-all: |
49 | - $(PYTHON) tools/win32/ostools.py remove build-win32 |
50 | - |
51 | -# make bzr.exe for win32 with py2exe |
52 | -exe: |
53 | - @echo *** Make bzr.exe |
54 | - $(PYTHON) tools/win32/ostools.py remove bzrlib/*.pyd |
55 | - $(PYTHON) setup.py build_ext -i -f $(PYTHON_BUILDFLAGS) |
56 | - $(PYTHON) setup.py py2exe > py2exe.log |
57 | - $(PYTHON) tools/win32/ostools.py copytodir tools/win32/start_bzr.bat win32_bzr.exe |
58 | - $(PYTHON) tools/win32/ostools.py copytodir tools/win32/bazaar.url win32_bzr.exe |
59 | - |
60 | -# win32 installer for bzr.exe |
61 | -installer: exe copy-docs |
62 | - @echo *** Make Windows installer |
63 | - $(PYTHON) tools/win32/run_script.py cog.py -d -o tools/win32/bzr.iss tools/win32/bzr.iss.cog |
64 | - iscc /Q tools/win32/bzr.iss |
65 | - |
66 | -# win32 Python's distutils-based installer |
67 | -# require to have Python interpreter installed on win32 |
68 | -py-inst-24: docs |
69 | - $(PYTHON24) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
70 | - |
71 | -py-inst-25: docs |
72 | - $(PYTHON25) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
73 | - |
74 | -py-inst-26: docs |
75 | - $(PYTHON26) setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
76 | - |
77 | -python-installer: py-inst-24 py-inst-25 py-inst-26 |
78 | - |
79 | - |
80 | -copy-docs: docs |
81 | - $(PYTHON) tools/win32/ostools.py copytodir README win32_bzr.exe/doc |
82 | - $(PYTHON) tools/win32/ostools.py copytree $(WEB_DOCS) win32_bzr.exe |
83 | - |
84 | -# clean on win32 all installer-related files and directories |
85 | -clean-win32: clean-docs |
86 | - $(PYTHON) tools/win32/ostools.py remove build |
87 | - $(PYTHON) tools/win32/ostools.py remove win32_bzr.exe |
88 | - $(PYTHON) tools/win32/ostools.py remove py2exe.log |
89 | - $(PYTHON) tools/win32/ostools.py remove tools/win32/bzr.iss |
90 | - $(PYTHON) tools/win32/ostools.py remove bzr-setup*.exe |
91 | - $(PYTHON) tools/win32/ostools.py remove bzr-*win32.exe |
92 | - $(PYTHON) tools/win32/ostools.py remove dist |
93 | - |
94 | - |
95 | ### Packaging Targets ### |
96 | |
97 | .PHONY: dist dist-upload-escudero check-dist-tarball |
98 | |
99 | === removed file 'tools/win32/bootstrap.py' |
100 | --- tools/win32/bootstrap.py 2009-05-29 14:19:29 +0000 |
101 | +++ tools/win32/bootstrap.py 1970-01-01 00:00:00 +0000 |
102 | @@ -1,77 +0,0 @@ |
103 | -############################################################################## |
104 | -# |
105 | -# Copyright (c) 2006 Zope Corporation and Contributors. |
106 | -# All Rights Reserved. |
107 | -# |
108 | -# This software is subject to the provisions of the Zope Public License, |
109 | -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. |
110 | -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED |
111 | -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
112 | -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS |
113 | -# FOR A PARTICULAR PURPOSE. |
114 | -# |
115 | -############################################################################## |
116 | -"""Bootstrap a buildout-based project |
117 | - |
118 | -Simply run this script in a directory containing a buildout.cfg. |
119 | -The script accepts buildout command-line options, so you can |
120 | -use the -c option to specify an alternate configuration file. |
121 | - |
122 | -$Id: bootstrap.py 90478 2008-08-27 22:44:46Z georgyberdyshev $ |
123 | -""" |
124 | - |
125 | -import os, shutil, sys, tempfile, urllib2 |
126 | - |
127 | -tmpeggs = tempfile.mkdtemp() |
128 | - |
129 | -is_jython = sys.platform.startswith('java') |
130 | - |
131 | -try: |
132 | - import pkg_resources |
133 | -except ImportError: |
134 | - ez = {} |
135 | - exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' |
136 | - ).read() in ez |
137 | - ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) |
138 | - |
139 | - import pkg_resources |
140 | - |
141 | -if sys.platform == 'win32': |
142 | - def quote(c): |
143 | - if ' ' in c: |
144 | - return '"%s"' % c # work around spawn lamosity on windows |
145 | - else: |
146 | - return c |
147 | -else: |
148 | - def quote (c): |
149 | - return c |
150 | - |
151 | -cmd = 'from setuptools.command.easy_install import main; main()' |
152 | -ws = pkg_resources.working_set |
153 | - |
154 | -if is_jython: |
155 | - import subprocess |
156 | - |
157 | - assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', |
158 | - quote(tmpeggs), 'zc.buildout'], |
159 | - env=dict(os.environ, |
160 | - PYTHONPATH= |
161 | - ws.find(pkg_resources.Requirement.parse('setuptools')).location |
162 | - ), |
163 | - ).wait() == 0 |
164 | - |
165 | -else: |
166 | - assert os.spawnle( |
167 | - os.P_WAIT, sys.executable, quote (sys.executable), |
168 | - '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout', |
169 | - dict(os.environ, |
170 | - PYTHONPATH= |
171 | - ws.find(pkg_resources.Requirement.parse('setuptools')).location |
172 | - ), |
173 | - ) == 0 |
174 | - |
175 | -ws.add_entry(tmpeggs) |
176 | -ws.require('zc.buildout') |
177 | -import zc.buildout.buildout |
178 | -zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) |
179 | -shutil.rmtree(tmpeggs) |
180 | |
181 | === removed file 'tools/win32/build_release.py' |
182 | --- tools/win32/build_release.py 2009-07-31 19:09:31 +0000 |
183 | +++ tools/win32/build_release.py 1970-01-01 00:00:00 +0000 |
184 | @@ -1,207 +0,0 @@ |
185 | -#!/cygdrive/C/Python25/python |
186 | -"""A script to help automate the build process.""" |
187 | - |
188 | -# When preparing a new release, make sure to set all of these to the latest |
189 | -# values. |
190 | -VERSIONS = { |
191 | - 'bzr': '1.17', |
192 | - 'qbzr': '0.12', |
193 | - 'bzrtools': '1.17.0', |
194 | - 'bzr-svn': '0.6.3', |
195 | - 'bzr-rewrite': '0.5.2', |
196 | - 'subvertpy': '0.6.8', |
197 | -} |
198 | - |
199 | -# This will be passed to 'make' to ensure we build with the right python |
200 | -PYTHON='/cygdrive/c/Python25/python' |
201 | - |
202 | -# Create the final build in this directory |
203 | -TARGET_ROOT='release' |
204 | - |
205 | -DEBUG_SUBPROCESS = True |
206 | - |
207 | - |
208 | -import os |
209 | -import shutil |
210 | -import subprocess |
211 | -import sys |
212 | - |
213 | - |
214 | -BZR_EXE = None |
215 | -def bzr(): |
216 | - global BZR_EXE |
217 | - if BZR_EXE is not None: |
218 | - return BZR_EXE |
219 | - try: |
220 | - subprocess.call(['bzr', '--version'], stdout=subprocess.PIPE, |
221 | - stderr=subprocess.PIPE) |
222 | - BZR_EXE = 'bzr' |
223 | - except OSError: |
224 | - try: |
225 | - subprocess.call(['bzr.bat', '--version'], stdout=subprocess.PIPE, |
226 | - stderr=subprocess.PIPE) |
227 | - BZR_EXE = 'bzr.bat' |
228 | - except OSError: |
229 | - raise RuntimeError('Could not find bzr or bzr.bat on your path.') |
230 | - return BZR_EXE |
231 | - |
232 | - |
233 | -def call_or_fail(*args, **kwargs): |
234 | - """Call a subprocess, and fail if the return code is not 0.""" |
235 | - if DEBUG_SUBPROCESS: |
236 | - print ' calling: "%s"' % (' '.join(args[0]),) |
237 | - p = subprocess.Popen(*args, **kwargs) |
238 | - (out, err) = p.communicate() |
239 | - if p.returncode != 0: |
240 | - raise RuntimeError('Failed to run: %s, %s' % (args, kwargs)) |
241 | - return out |
242 | - |
243 | - |
244 | -TARGET = None |
245 | -def get_target(): |
246 | - global TARGET |
247 | - if TARGET is not None: |
248 | - return TARGET |
249 | - out = call_or_fail([sys.executable, get_bzr_dir() + '/bzr', |
250 | - 'version', '--short'], stdout=subprocess.PIPE) |
251 | - version = out.strip() |
252 | - TARGET = os.path.abspath(TARGET_ROOT + '-' + version) |
253 | - return TARGET |
254 | - |
255 | - |
256 | -def clean_target(): |
257 | - """Nuke the target directory so we know we are starting from scratch.""" |
258 | - target = get_target() |
259 | - if os.path.isdir(target): |
260 | - print "Deleting: %s" % (target,) |
261 | - shutil.rmtree(target) |
262 | - |
263 | -def get_bzr_dir(): |
264 | - return 'bzr.' + VERSIONS['bzr'] |
265 | - |
266 | - |
267 | -def update_bzr(): |
268 | - """Make sure we have the latest bzr in play.""" |
269 | - bzr_dir = get_bzr_dir() |
270 | - if not os.path.isdir(bzr_dir): |
271 | - bzr_version = VERSIONS['bzr'] |
272 | - # bzr_url = 'http://bazaar-vcs.org/bzr/bzr.' + bzr_version |
273 | - bzr_url = 'lp:bzr/' + bzr_version |
274 | - print "Getting bzr release %s from %s" % (bzr_version, bzr_url) |
275 | - call_or_fail([bzr(), 'co', bzr_url, bzr_dir]) |
276 | - else: |
277 | - print "Ensuring %s is up-to-date" % (bzr_dir,) |
278 | - call_or_fail([bzr(), 'update', bzr_dir]) |
279 | - |
280 | - |
281 | -def create_target(): |
282 | - target = get_target() |
283 | - print "Creating target dir: %s" % (target,) |
284 | - call_or_fail([bzr(), 'co', get_bzr_dir(), target]) |
285 | - |
286 | - |
287 | -def get_plugin_trunk_dir(plugin_name): |
288 | - return '%s/trunk' % (plugin_name,) |
289 | - |
290 | - |
291 | -def get_plugin_release_dir(plugin_name): |
292 | - return '%s/%s' % (plugin_name, VERSIONS[plugin_name]) |
293 | - |
294 | - |
295 | -def get_plugin_trunk_branch(plugin_name): |
296 | - return 'lp:%s' % (plugin_name,) |
297 | - |
298 | - |
299 | -def update_plugin_trunk(plugin_name): |
300 | - trunk_dir = get_plugin_trunk_dir(plugin_name) |
301 | - if not os.path.isdir(trunk_dir): |
302 | - plugin_trunk = get_plugin_trunk_branch(plugin_name) |
303 | - print "Getting latest %s trunk" % (plugin_name,) |
304 | - call_or_fail([bzr(), 'co', plugin_trunk, |
305 | - trunk_dir]) |
306 | - else: |
307 | - print "Ensuring %s is up-to-date" % (trunk_dir,) |
308 | - call_or_fail([bzr(), 'update', trunk_dir]) |
309 | - return trunk_dir |
310 | - |
311 | - |
312 | -def _plugin_tag_name(plugin_name): |
313 | - if plugin_name in ('bzr-svn', 'bzr-rewrite', 'subvertpy'): |
314 | - return '%s-%s' % (plugin_name, VERSIONS[plugin_name]) |
315 | - # bzrtools and qbzr use 'release-X.Y.Z' |
316 | - return 'release-' + VERSIONS[plugin_name] |
317 | - |
318 | - |
319 | -def update_plugin(plugin_name): |
320 | - release_dir = get_plugin_release_dir(plugin_name) |
321 | - if not os.path.isdir(plugin_name): |
322 | - if plugin_name in ('bzr-svn', 'bzr-rewrite'): |
323 | - # bzr-svn uses a different repo format |
324 | - call_or_fail([bzr(), 'init-repo', '--rich-root-pack', plugin_name]) |
325 | - else: |
326 | - os.mkdir(plugin_name) |
327 | - if os.path.isdir(release_dir): |
328 | - print "Removing existing dir: %s" % (release_dir,) |
329 | - shutil.rmtree(release_dir) |
330 | - # First update trunk |
331 | - trunk_dir = update_plugin_trunk(plugin_name) |
332 | - # Now create the tagged directory |
333 | - tag_name = _plugin_tag_name(plugin_name) |
334 | - print "Creating the branch %s" % (release_dir,) |
335 | - call_or_fail([bzr(), 'co', '-rtag:%s' % (tag_name,), |
336 | - trunk_dir, release_dir]) |
337 | - return release_dir |
338 | - |
339 | - |
340 | -def install_plugin(plugin_name): |
341 | - release_dir = update_plugin(plugin_name) |
342 | - # at least bzrtools doesn't like you to call 'setup.py' unless you are in |
343 | - # that directory specifically, so we cd, rather than calling it from |
344 | - # outside |
345 | - print "Installing %s" % (release_dir,) |
346 | - call_or_fail([sys.executable, 'setup.py', 'install', '-O1', |
347 | - '--install-lib=%s' % (get_target(),)], |
348 | - cwd=release_dir) |
349 | - |
350 | - |
351 | -def update_tbzr(): |
352 | - tbzr_loc = os.environ.get('TBZR', None) |
353 | - if tbzr_loc is None: |
354 | - raise ValueError('You must set TBZR to the location of tortoisebzr.') |
355 | - print 'Updating %s' % (tbzr_loc,) |
356 | - call_or_fail([bzr(), 'update', tbzr_loc]) |
357 | - |
358 | - |
359 | -def build_installer(): |
360 | - target = get_target() |
361 | |
362 | |
363 | - print '*' * 60 |
364 | - print 'Building standalone installer' |
365 | - call_or_fail(['make', 'PYTHON=%s' % (PYTHON,), 'installer'], |
366 | - cwd=target) |
367 | - |
368 | - |
369 | -def main(args): |
370 | - import optparse |
371 | - |
372 | - p = optparse.OptionParser(usage='%prog [OPTIONS]') |
373 | - opts, args = p.parse_args(args) |
374 | - |
375 | - update_bzr() |
376 | - update_tbzr() |
377 | - clean_target() |
378 | - create_target() |
379 | - install_plugin('subvertpy') |
380 | - install_plugin('bzrtools') |
381 | - install_plugin('qbzr') |
382 | - install_plugin('bzr-svn') |
383 | - install_plugin('bzr-rewrite') |
384 | - |
385 | - build_installer() |
386 | - |
387 | - |
388 | -if __name__ == '__main__': |
389 | - main(sys.argv[1:]) |
390 | - |
391 | -# vim: ts=4 sw=4 sts=4 et ai |
392 | |
393 | === removed directory 'tools/win32/buildout-templates' |
394 | === removed directory 'tools/win32/buildout-templates/bin' |
395 | === removed file 'tools/win32/buildout-templates/bin/build-installer.bat.in' |
396 | --- tools/win32/buildout-templates/bin/build-installer.bat.in 2009-08-12 22:03:06 +0000 |
397 | +++ tools/win32/buildout-templates/bin/build-installer.bat.in 1970-01-01 00:00:00 +0000 |
398 | @@ -1,108 +0,0 @@ |
399 | -@echo off |
400 | -setlocal |
401 | - |
402 | -set ROOT=${buildout:directory} |
403 | - |
404 | -set RELEASE=%ROOT%\release\bzr.${settings:bzr-release} |
405 | -set DEV=%ROOT%\dev\bzr.dev |
406 | -set TARGET= |
407 | -set BZR_TARGET= |
408 | -set PLUGIN_TARGET= |
409 | - |
410 | -set SVN_DEV=${buildout:directory}/${svn-dev:destination} |
411 | -set SVN_BDB=${buildout:directory}/${svn-db4:destination} |
412 | -set SVN_LIBINTL=${buildout:directory}/${svn-libintl:destination} |
413 | -set TBZR=${buildout:directory}/tbzr/trunk |
414 | -set INSTALLERS=%ROOT%\installers |
415 | -set PYTHON=${buildout:executable} |
416 | - |
417 | -set ORIGINAL_PYTHONPATH=%PYTHONPATH% |
418 | -set ORIGINAL_DIRECTORY=%CD% |
419 | - |
420 | -set BUILD_ERROR=0 |
421 | - |
422 | -set TORTOISE_OVERLAYS_MSI_WIN32_CMD=%PYTHON% %ROOT%/ostools.py basename ${settings:tortoise-overlays-win32-url} |
423 | -FOR /f "tokens=1 delims= " %%G IN ('%TORTOISE_OVERLAYS_MSI_WIN32_CMD%') DO set BASENAME=%%G |
424 | -set TORTOISE_OVERLAYS_MSI_WIN32=${buildout:directory}/tortoise-overlays/%BASENAME% |
425 | - |
426 | -set TORTOISE_OVERLAYS_MSI_X64_CMD=%PYTHON% %ROOT%/ostools.py basename ${settings:tortoise-overlays-x64-url} |
427 | -FOR /f "tokens=1 delims= " %%G IN ('%TORTOISE_OVERLAYS_MSI_X64_CMD%') DO set BASENAME=%%G |
428 | -set TORTOISE_OVERLAYS_MSI_X64=${buildout:directory}/tortoise-overlays/%BASENAME% |
429 | - |
430 | -FOR /f "tokens=1 delims= " %%G IN ('cygpath %PYTHON%') DO set CYG_PYTHON=%%G |
431 | - |
432 | -:ARGS |
433 | -if "%1"=="release" (set TARGET=%RELEASE%) & (set BZR_TARGET=release) & shift & goto ARGS |
434 | -if "%1"=="dev" (set TARGET=%DEV%) & (set BZR_TARGET=trunk) & shift & goto ARGS |
435 | -if "%1"=="plugin-release" (set PLUGIN_TARGET=release) & shift & goto ARGS |
436 | -if "%1"=="plugin-dev" (set PLUGIN_TARGET=trunk) & shift & goto ARGS |
437 | - |
438 | -if not defined TARGET (set TARGET=%RELEASE%) & (set BZR_TARGET=release) |
439 | -if not defined PLUGIN_TARGET (set PLUGIN_TARGET=release) |
440 | - |
441 | -%PYTHON% %ROOT%/ostools.py remove %TARGET% |
442 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
443 | - |
444 | -%PYTHON% %ROOT%/ostools.py makedir %TARGET% |
445 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
446 | - |
447 | -%PYTHON% %ROOT%/ostools.py makedir %INSTALLERS% |
448 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
449 | - |
450 | -rem Use %COMSPEC% /c in case bzr is actually a .bat file |
451 | -%COMSPEC% /c bzr co %ROOT%/bzr/%BZR_TARGET% %TARGET% |
452 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
453 | - |
454 | -rem Build the python installers first, because we don't want to |
455 | -rem include any of the 3rd-party plugins, because we don't bundle |
456 | -rem their dependencies. |
457 | -cd %TARGET% |
458 | - |
459 | -rem This is slightly redundant with 'make installer-all' |
460 | -rem except in that case we have to do cygwin path translations for all the |
461 | -rem different versions of python |
462 | -${settings:python24} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
463 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
464 | - |
465 | -${settings:python25} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
466 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
467 | - |
468 | -${settings:python26} setup.py bdist_wininst --install-script="bzr-win32-bdist-postinstall.py" -d . |
469 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
470 | - |
471 | -cd %ROOT%/subvertpy/%PLUGIN_TARGET% |
472 | -%PYTHON% setup.py install -O1 --install-lib=%TARGET% |
473 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
474 | - |
475 | -cd %ROOT%/bzrtools/%PLUGIN_TARGET% |
476 | -%PYTHON% setup.py install -O1 --install-lib=%TARGET% |
477 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
478 | - |
479 | -cd %ROOT%/qbzr/%PLUGIN_TARGET% |
480 | -%PYTHON% setup.py install -O1 --install-lib=%TARGET% |
481 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
482 | - |
483 | -cd %ROOT%/bzr-svn/%PLUGIN_TARGET% |
484 | -%PYTHON% setup.py install -O1 --install-lib=%TARGET% |
485 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
486 | - |
487 | -cd %ROOT%/bzr-rewrite/%PLUGIN_TARGET% |
488 | -%PYTHON% setup.py install -O1 --install-lib=%TARGET% |
489 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
490 | - |
491 | -set PYTHONPATH=%PYTHONPATH%;%TARGET% |
492 | -cd %ROOT%/tbzr/trunk |
493 | -%PYTHON% setup.py build |
494 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
495 | - |
496 | -cd %TARGET% |
497 | -make installer PYTHON=%CYG_PYTHON% |
498 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
499 | - |
500 | -%PYTHON% %ROOT%/ostools.py copytodir %TARGET%/bzr*.exe %INSTALLERS% |
501 | -@if %ERRORLEVEL% NEQ 0 (set BUILD_ERROR=%ERRORLEVEL%) & goto End |
502 | - |
503 | -:End |
504 | -set PYTHONPATH=%ORIGINAL_PYTHONPATH% |
505 | -cd %ORIGINAL_DIRECTORY% |
506 | -exit /b %BUILD_ERROR% |
507 | |
508 | === removed file 'tools/win32/buildout.cfg' |
509 | --- tools/win32/buildout.cfg 2009-08-20 09:30:34 +0000 |
510 | +++ tools/win32/buildout.cfg 1970-01-01 00:00:00 +0000 |
511 | @@ -1,197 +0,0 @@ |
512 | -[buildout] |
513 | -newest = false |
514 | -versions = versions |
515 | -parts = |
516 | - svn-lib |
517 | - svn-dev |
518 | - svn-db4 |
519 | - svn-libintl |
520 | - zlib |
521 | - tortoise-overlays-win32 |
522 | - tortoise-overlays-x64 |
523 | - |
524 | - bzr |
525 | - qbzr |
526 | - tbzr |
527 | - bzrtools |
528 | - bzr-svn |
529 | - bzr-rewrite |
530 | - subvertpy |
531 | - templates |
532 | - |
533 | -develop = |
534 | - |
535 | -[versions] |
536 | -zc.buildout = 1.2.1 |
537 | -setuptools = 0.6c9 |
538 | -z3c.recipe.filetemplate = 2.0.3 |
539 | -gf.recipe.bzr = 1.0rc8 |
540 | - |
541 | -[settings] |
542 | -python24=c:\Python24\python.exe |
543 | -python25=c:\Python25\python.exe |
544 | -python26=c:\Python26\python.exe |
545 | -download-ignore-existing = false |
546 | -svn-dev-url = |
547 | - http://subversion.tigris.org/files/documents/15/45228/svn-win32-1.5.6_dev.zip |
548 | -svn-lib-url = |
549 | - http://subversion.tigris.org/files/documents/15/45222/svn-win32-1.5.6.zip |
550 | -svn-db4-url = |
551 | - http://subversion.tigris.org/files/documents/15/32472/db-4.4.20-win32.zip |
552 | -svn-libintl-url = |
553 | - http://subversion.tigris.org/files/documents/15/20739/svn-win32-libintl.zip |
554 | -tortoise-overlays-win32-url = http://guest:password@tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays/version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-win32.msi |
555 | -tortoise-overlays-x64-url = http://guest:password@tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays/version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-x64.msi |
556 | -zlib-url = |
557 | - http://www.zlib.net/zlib123-dll.zip |
558 | - |
559 | -bzr-release = 1.18 |
560 | -# Older releases were @ http://bazaar-vcs.org, new releases are hosted directly |
561 | -# on Launchpad |
562 | -# bzr-release-url = http://bazaar-vcs.org/bzr/bzr.${settings:bzr-release} |
563 | -bzr-release-url = lp:bzr/${settings:bzr-release} |
564 | -bzr-trunk-url = http://bazaar-vcs.org/bzr/bzr.dev |
565 | - |
566 | -bzrtools-release = 1.18.0 |
567 | -bzrtools-release-tag = tag:release-${settings:bzrtools-release} |
568 | -bzrtools-trunk-url = lp:bzrtools |
569 | - |
570 | -qbzr-release = 0.13.1 |
571 | -qbzr-release-tag = tag:release-${settings:qbzr-release} |
572 | -qbzr-trunk-url = lp:qbzr |
573 | - |
574 | -tbzr-release = 0.1.0 |
575 | -tbzr-release-tag = tag:release-${settings:tbzr-release} |
576 | -tbzr-trunk-url = lp:tortoisebzr |
577 | - |
578 | -bzr-svn-release = 0.6.4 |
579 | -bzr-svn-release-tag = tag:bzr-svn-${settings:bzr-svn-release} |
580 | -bzr-svn-trunk-url = lp:bzr-svn |
581 | - |
582 | -# This isn't a typo, as of last release, the branch is lp:bzr-rewrite but the |
583 | -# tag is bzr-rebase-0.5.3 |
584 | -bzr-rewrite-release = 0.5.3 |
585 | -bzr-rewrite-release-tag = tag:bzr-rebase-${settings:bzr-rewrite-release} |
586 | -bzr-rewrite-trunk-url = lp:bzr-rewrite |
587 | - |
588 | -subvertpy-release = 0.6.8 |
589 | -subvertpy-release-tag = tag:subvertpy-${settings:subvertpy-release} |
590 | -subvertpy-trunk-url = lp:subvertpy |
591 | - |
592 | -[templates] |
593 | -recipe = z3c.recipe.filetemplate |
594 | -source-directory = buildout-templates |
595 | - |
596 | -[svn-lib] |
597 | -recipe = hexagonit.recipe.download |
598 | -url = ${settings:svn-lib-url} |
599 | -ignore-existing = ${settings:download-ignore-existing} |
600 | -strip-top-level-dir = true |
601 | -destination = svn |
602 | - |
603 | -# This package needs to be extracted on top of svn-lib above, so we |
604 | -# explicitly set it to ignore existing here. |
605 | -[svn-dev] |
606 | -recipe = hexagonit.recipe.download |
607 | -url = ${settings:svn-dev-url} |
608 | -ignore-existing = true |
609 | -strip-top-level-dir = true |
610 | -destination = svn |
611 | - |
612 | -[svn-db4] |
613 | -recipe = hexagonit.recipe.download |
614 | -url = ${settings:svn-db4-url} |
615 | -ignore-existing = ${settings:download-ignore-existing} |
616 | -strip-top-level-dir = true |
617 | -destination = db4 |
618 | - |
619 | -[svn-libintl] |
620 | -recipe = hexagonit.recipe.download |
621 | -url = ${settings:svn-libintl-url} |
622 | -ignore-existing = ${settings:download-ignore-existing} |
623 | -strip-top-level-dir = true |
624 | -destination = libintl |
625 | - |
626 | -[zlib] |
627 | -recipe = hexagonit.recipe.download |
628 | -url = ${settings:zlib-url} |
629 | -ignore-existing = ${settings:download-ignore-existing} |
630 | -strip-top-level-dir = false |
631 | -destination = zlib |
632 | - |
633 | -[tortoise-overlays-win32] |
634 | -recipe = hexagonit.recipe.download |
635 | -url = ${settings:tortoise-overlays-win32-url} |
636 | -ignore-existing = ${settings:download-ignore-existing} |
637 | -destination = tortoise-overlays |
638 | -download-only = true |
639 | - |
640 | -[tortoise-overlays-x64] |
641 | -recipe = hexagonit.recipe.download |
642 | -url = ${settings:tortoise-overlays-x64-url} |
643 | -ignore-existing = ${settings:download-ignore-existing} |
644 | -destination = tortoise-overlays |
645 | -download-only = true |
646 | - |
647 | -[bzr] |
648 | -recipe = gf.recipe.bzr:strict |
649 | -shared-repo = false |
650 | -format = 1.9 |
651 | -urls = |
652 | - ${settings:bzr-release-url} release |
653 | - ${settings:bzr-trunk-url} trunk |
654 | -develop = false |
655 | - |
656 | -[bzrtools] |
657 | -recipe = gf.recipe.bzr:strict |
658 | -shared-repo = true |
659 | -format = 2a |
660 | -urls = |
661 | - ${settings:bzrtools-trunk-url} trunk |
662 | - ${buildout:directory}/bzrtools/trunk@${settings:bzrtools-release-tag} release |
663 | -develop = false |
664 | - |
665 | -[qbzr] |
666 | -recipe = gf.recipe.bzr:strict |
667 | -shared-repo = true |
668 | -format = 1.9 |
669 | -urls = |
670 | - ${settings:qbzr-trunk-url} trunk |
671 | - ${buildout:directory}/qbzr/trunk@${settings:qbzr-release-tag} release |
672 | -develop = false |
673 | - |
674 | -[tbzr] |
675 | -recipe = gf.recipe.bzr:strict |
676 | -shared-repo = true |
677 | -format = 1.9 |
678 | -urls = |
679 | - ${settings:tbzr-trunk-url} trunk |
680 | - ${buildout:directory}/tbzr/trunk@${settings:tbzr-release-tag} release |
681 | -develop = false |
682 | - |
683 | -[bzr-svn] |
684 | -recipe = gf.recipe.bzr:strict |
685 | -shared-repo = true |
686 | -format = 2a |
687 | -urls = |
688 | - ${settings:bzr-svn-trunk-url} trunk |
689 | - ${buildout:directory}/bzr-svn/trunk@${settings:bzr-svn-release-tag} release |
690 | -develop = false |
691 | - |
692 | -[bzr-rewrite] |
693 | -recipe = gf.recipe.bzr:strict |
694 | -shared-repo = true |
695 | -format = 1.9-rich-root |
696 | -urls = |
697 | - ${settings:bzr-rewrite-trunk-url} trunk |
698 | - ${buildout:directory}/bzr-rewrite/trunk@${settings:bzr-rewrite-release-tag} release |
699 | -develop = false |
700 | - |
701 | -[subvertpy] |
702 | -recipe = gf.recipe.bzr:strict |
703 | -shared-repo = true |
704 | -format = 1.9-rich-root |
705 | -urls = |
706 | - ${settings:subvertpy-trunk-url} trunk |
707 | - ${buildout:directory}/subvertpy/trunk@${settings:subvertpy-release-tag} release |
708 | -develop = false |
709 | |
710 | === removed file 'tools/win32/ostools.py' |
711 | --- tools/win32/ostools.py 2009-07-04 02:30:35 +0000 |
712 | +++ tools/win32/ostools.py 1970-01-01 00:00:00 +0000 |
713 | @@ -1,138 +0,0 @@ |
714 | -#!/usr/bin/python |
715 | - |
716 | -"""Cross-platform os tools: files/directories manipulations |
717 | -Usage: |
718 | - |
719 | - ostools.py help |
720 | - prints this help |
721 | - |
722 | - ostools.py copytodir FILES... DIR |
723 | - copy files to specified directory |
724 | - |
725 | - ostools.py copytree FILES... DIR |
726 | - copy files to specified directory keeping relative paths |
727 | - |
728 | - ostools.py remove [FILES...] [DIRS...] |
729 | - remove files or directories (recursive) |
730 | -""" |
731 | - |
732 | -import glob |
733 | -import os |
734 | -import shutil |
735 | -import sys |
736 | - |
737 | -def makedir(dirname): |
738 | - if not os.path.exists(dirname): |
739 | - os.makedirs(dirname) |
740 | - if not os.path.isdir(dirname): |
741 | - print "Error: Destination is not a directory", dirname |
742 | - return 2 |
743 | - return 0 |
744 | - |
745 | -def main(argv=None): |
746 | - if argv is None: |
747 | - argv = sys.argv[1:] |
748 | - |
749 | - if not argv: |
750 | - argv = ['help'] |
751 | - |
752 | - cmd = argv.pop(0) |
753 | - |
754 | - if cmd == 'help': |
755 | - print __doc__ |
756 | - return 0 |
757 | - |
758 | - if cmd == 'copytodir': |
759 | - if len(argv) < 2: |
760 | - print "Usage: ostools.py copytodir FILES... DIR" |
761 | - return 1 |
762 | - |
763 | - todir = argv.pop() |
764 | - retcode = makedir(todir) |
765 | - if retcode: |
766 | - return retcode |
767 | - |
768 | - files = [] |
769 | - for possible_glob in argv: |
770 | - files += glob.glob(possible_glob) |
771 | - |
772 | - for src in files: |
773 | - dest = os.path.join(todir, os.path.basename(src)) |
774 | - shutil.copy(src, dest) |
775 | - print "Copied:", src, "=>", dest |
776 | - |
777 | - return 0 |
778 | - |
779 | - if cmd == 'copytree': |
780 | - if len(argv) < 2: |
781 | - print "Usage: ostools.py copytree FILES... DIR" |
782 | - return 1 |
783 | - |
784 | - todir = argv.pop() |
785 | - retcode = makedir(todir) |
786 | - if retcode: |
787 | - return retcode |
788 | - |
789 | - files = [] |
790 | - for possible_glob in argv: |
791 | - files += glob.glob(possible_glob) |
792 | - |
793 | - for src in files: |
794 | - relative_path = src |
795 | - dest = os.path.join(todir, relative_path) |
796 | - dest_dir = os.path.dirname(dest) |
797 | - retcode = makedir(dest_dir) |
798 | - if retcode: |
799 | - return retcode |
800 | - shutil.copy(src, dest) |
801 | - print "Copied:", src, "=>", dest |
802 | - |
803 | - return 0 |
804 | - |
805 | - if cmd == 'remove': |
806 | - if len(argv) == 0: |
807 | - print "Usage: ostools.py remove [FILES...] [DIRS...]" |
808 | - return 1 |
809 | - |
810 | - filesdirs = [] |
811 | - for possible_glob in argv: |
812 | - filesdirs += glob.glob(possible_glob) |
813 | - |
814 | - for i in filesdirs: |
815 | - if os.path.isdir(i): |
816 | - shutil.rmtree(i) |
817 | - print "Removed:", i |
818 | - elif os.path.isfile(i): |
819 | - os.remove(i) |
820 | - print "Removed:", i |
821 | - else: |
822 | - print "Not found:", i |
823 | - |
824 | - return 0 |
825 | - |
826 | - if cmd == "basename": |
827 | - if len(argv) == 0: |
828 | - print "Usage: ostools.py basename [PATH | URL]" |
829 | - return 1 |
830 | - |
831 | - for path in argv: |
832 | - print os.path.basename(path) |
833 | - return 0 |
834 | - |
835 | - if cmd == 'makedir': |
836 | - if len(argv) == 0: |
837 | - print "Usage: ostools.py makedir DIR" |
838 | - return 1 |
839 | - |
840 | - retcode = makedir(argv.pop()) |
841 | - if retcode: |
842 | - return retcode |
843 | - return 0 |
844 | - |
845 | - print "Usage error" |
846 | - print __doc__ |
847 | - return 1 |
848 | - |
849 | - |
850 | -if __name__ == "__main__": |
851 | - sys.exit(main()) |
852 | |
853 | === removed file 'tools/win32/run_script.py' |
854 | --- tools/win32/run_script.py 2008-07-17 00:41:25 +0000 |
855 | +++ tools/win32/run_script.py 1970-01-01 00:00:00 +0000 |
856 | @@ -1,16 +0,0 @@ |
857 | -# A utility that executes a script from our %PYTHON%\Scripts directory. |
858 | -# Example usage: |
859 | -# 'python run_script.py cog.py arg1 arg2' |
860 | -# which will locate %PYTHON_HOME%/Scripts/cog.py and execute it with the args. |
861 | -# This is only necessary for Windows, and only when the build process is |
862 | -# executed via a cygwin/*nix based make utility, which doesn't honor the |
863 | -# PATHEXT environment variable. |
864 | -import sys |
865 | -import os |
866 | - |
867 | -if __name__ == '__main__': |
868 | - # clobber me, new sys.argv[0] is the script to run. |
869 | - del sys.argv[0] |
870 | - assert not os.path.isabs(sys.argv[0]), "If you know the FQ path, just use it!" |
871 | - sys.argv[0] = os.path.join(sys.prefix, "Scripts", sys.argv[0]) |
872 | - execfile(sys.argv[0]) |
This removes some of the win32 build cruft from the bzr codebase. Unfortunately I cannot (yet) remove all of it, because a decent portion of the build process still uses the code from here. (Namely we run 'iscc bzr.iss' on the file from the bzr source, rather than using that file from bzr-windows- installers. This should get fixed.
In the short term, this at least is a small reduction in random stuff in the bzr codebase. It also helps force the bzr-windows- installers project not to expect to find certain files in the bzr code, rather than looking in the installers code.