Windows-related ideas for bzr
Andrew Voznytsa
andrew.voznytsa at gmail.com
Wed Jun 6 11:55:19 BST 2007
> -----Original Message-----
> From: Alexander Belchenko [mailto:bialix at ukr.net]
> Sent: Wednesday, June 06, 2007 12:41 PM
> To: Andrew Voznytsa
> Cc: bazaar at lists.canonical.com
> Subject: Re: Windows-related ideas for bzr
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Andrew Voznytsa пишет:
> > At some point I'm planning to play with MSI. As learning course I may
> > implement MSI installer for bazaar. It shouldn't be too hard.
> > http://wix.sourceforge.net looks like good candidate for MSI building.
>
> Actually, support for creating MSI-based installers for python modules
> and packages is already built-in in Python 2.5. It needs only small
> changes
> to Bazaar codebase:
>
> === modified file 'Makefile'
> - --- Makefile 2007-06-06 07:57:00 +0000
> +++ Makefile 2007-06-06 09:17:24 +0000
> @@ -148,6 +148,9 @@
> python-installer: docs
> python setup.py bdist_wininst --install-script="bzr-win32-bdist-
> postinstall.py" -d .
>
> +python-msi: docs
> + python setup.py bdist_msi --install-script="bzr-win32-bdist-
> postinstall.py" -d .
> +
>
> # clean on win32 all installer-related files and directories
> clean-win32:
>
> === modified file 'setup.py'
> - --- setup.py 2007-06-06 07:57:00 +0000
> +++ setup.py 2007-06-06 09:16:59 +0000
> @@ -166,7 +166,7 @@
> # Extension("bzrlib.modulename", ["bzrlib/foo.pyx"], libraries =
> []))
> command_classes['build_ext'] = build_ext
>
> - -if 'bdist_wininst' in sys.argv:
> +if ('bdist_wininst' in sys.argv) or ('bdist_msi' in sys.argv):
> import glob
> # doc files
> docs = glob.glob('doc/*.htm') + ['doc/default.css']
>
>
> Unfortunately, MSI or eggs(?) don't like bzr version info:
Please read http://doc.astro-wise.org/distutils.version.html
It seems that 'right' version should looks like 0.17.0a0
I guess 'a'/'b' suffix in StrictVersion stands for Alpha/Beta.
So 0.17.0a0 should be read as 0.17.0 Alpha 0.
To make it clear (for me) - does this patch allows to generate MSI package
for bzr.exe?
>
> > make python-msi
> ...
> running install_egg_info
> Writing build\bdist.win32\msi\Lib\site-packages\bzr-0.17.0dev0-py2.5.egg-
> info
> Traceback (most recent call last):
> File "setup.py", line 186, in <module>
> setup(**ARGS)
> File "C:\Python25\lib\distutils\core.py", line 151, in setup
> File "C:\Python25\lib\distutils\dist.py", line 974, in run_commands
> File "C:\Python25\lib\distutils\dist.py", line 994, in run_command
> File "G:\Python25\lib\distutils\command\bdist_msi.py", line 215, in run
> sversion = "%d.%d.%d" % StrictVersion(version).version
> File "G:\Python25\lib\distutils\version.py", line 40, in __init__
> self.parse(vstring)
> File "G:\Python25\lib\distutils\version.py", line 107, in parse
> raise ValueError, "invalid version number '%s'" % vstring
> ValueError: invalid version number '0.17.0dev0'
>
>
> Of course for standalone bzr.exe we need to use some third-party tool,
> like WiX or similar.
>
Best regards,
Andrew Voznytsa
More information about the bazaar
mailing list