[MERGE] optionally install tbzr binaries with bazaar binaries on Windows
John Arbash Meinel
john at arbash-meinel.com
Thu Jul 31 16:25:02 BST 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mark Hammond wrote:
| Attached is an updated bundle which should address most of John's
comments,
| apart from the environment variables and the general concerns about
bundling
| tbzr at all.
|
| Cheers,
|
| Mark
Probably my biggest problem with using ENV vars is that you may not
really know :
1) That they exist at all
2) What you should set them too when you do know about them.
I see you at least warn if TBZR isn't set, so that we know they are
being skipped. The error could probably be improved to more accurately
describe what should be pointed at. TBZR shouldn't point to just any
directory :)
Also, if you are getting the TBZR warning, we may want to alert them to
TOVMSI_WIN32, rather than running failing, fixing that, running again,
failing, fixing that, etc. (I'm not strict on this, as it can be nice to
have short warnings if you aren't going to care about it.)
Also, what about looking in a semi-obvious local path. Like ../tbzr?
...
+ # Eg: via SVN:
http://tortoisesvn.tigris.org/svn/tortoisesvn/TortoiseOverlays/version-1.0.4/bin/TortoiseOverlays-1.0.4.11886-win32.msi
+ if not os.path.isfile(os.environ.get('TOVMSI_WIN32', '<nofile>')):
+ raise RuntimeError, "Please set TOVMSI_WIN32 to the
location of " \
+ "the TortoiseOverlays .msi installerfile"
^- This one I don't understand. The comment makes me think you could set
this to a URL and it would be downloaded, but the os.path.isfile() seems
to disagree.
I guess you are saying it should be downloaded, and then referenced
locally. The environment variable is rather cryptic, though. I'm
guessing it isn't a standard name, why not:
TORTOISE_OVERLAYS_MSI_PATH =
WIN32 is redundant with MSI. I would usually request a BZR_ at the
beginning, but these aren't *bzr* tortoise overlays.
...
~ print
+def get_tbzr_py2exe_info(includes, excludes, packages, console_targets,
+ gui_targets):
^- PEP8 asks for 2 blank lines between top-level functions/classes
...
+ console_targets.append(tracer)
+
+def get_qbzr_py2exe_info(includes, excludes, packages):
+ # PyQt4 itself still escapes the plugin detection code for some
reason...
^- same here (just add another blank line)
+// [[[cog
+// if "TBZR" in os.environ:
+// import os
+// cog.outl("tovmsi := '%s';" %
os.path.basename(os.environ["TOVMSI_WIN32"]))
+// else:
+// cog.outl("tovmsi := '';")
+// ]]]
+// [[[end]]]
^- We generally don't keep commented out sections, unless you have a
reason to include this. (Like you'll need it soon, etc.)
Overall
BB:tweak
I think this is going to be an improvement, and if you've decided that
installing "bzr" means a gui, that is ok.
The rest of the comments should really be another thread, but reading
this brought them to mind.
I'm honestly a bit concerned about choosing qbzr over bzr-gtk as the
standard toolkit. I agree that QT looks more like a Win32 app than GTK
(at least with the normal theming). It is just that the qbzr community
is significantly smaller than the bzr-gtk one. I suppose if qbzr starts
being the default install on win32, the community will grow.
This is outside the scope of your patch, but bloating the installer to
15MB is another concern. I honestly feel we should explore a
chain-install that sets up a python install (optionally, as a user may
have it), and then builds up into that, rather than using py2exe. Mostly
because there will be a few people that upgrade continuously, and having
them redownload all dependencies for every upgrade seems unfortunate.
I know Python itself is a .msi installer. I wonder if we couldn't
leverage that, and maybe work out a setuptools based installation that
can download whatever dependencies we need, rather than have to bundle
everything all-together.
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkiR2U4ACgkQJdeBCYSNAAP9GwCeOEddr5Se4KBMy+Vq0XxkK8Fu
zgMAoMcGAnmkFFpn7aBaayBWeeULoi83
=Q8qa
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list