← Back to team overview

bzr-windows team mailing list archive

Fwd: [Merge] lp:~gz/bzr/support_OO_flag_installer into lp:bzr

 

If somebody on Windows is able to test and comment on this merge
proposal it would be much appreciated.  It may shrink the installer
size.


---------- Forwarded message ----------
From: Martin [gz] <gzlist@xxxxxxxxxxxxxx>
Date: 30 April 2010 20:50
Subject: [Merge] lp:~gz/bzr/support_OO_flag_installer into lp:bzr
To: mp+24484@xxxxxxxxxxxxxxxxxx


Martin [gz] has proposed merging lp:~gz/bzr/support_OO_flag_installer
into lp:bzr.

Requested reviews:
 bzr-core (bzr-core)


Followup to the branch getting bzrlib to run correctly when docstrings
are stripped. This alters the setup script to build the windows
standalone installer that way, but should leave plugins untouched as
they can be adapted later.

I'm not set up to properly test this here. If someone who builds
windows installers can do a before and after, to see if this a) breaks
anything and b) helps at all, that would be great.

The library.zip with the 2.1.1 installer is 17.2MB, I'm interested in
how much of a saving can be got.
--
https://code.launchpad.net/~gz/bzr/support_OO_flag_installer/+merge/24484
Your team bzr-core is subscribed to branch lp:bzr.

=== modified file 'setup.py'
--- setup.py    2010-04-08 04:34:03 +0000
+++ setup.py    2010-04-30 10:50:33 +0000
@@ -534,17 +534,15 @@
            install_data.run(self)

            py2exe = self.distribution.get_command_obj('py2exe', False)
-            optimize = py2exe.optimize
+            # GZ 2010-04-19: Setup has py2exe.optimize as 2, but give plugins
+            #                time before living with docstring stripping
+            optimize = 1
            compile_names = [f for f in self.outfiles if f.endswith('.py')]
            byte_compile(compile_names,
                         optimize=optimize,
                         force=self.force, prefix=self.install_dir,
                         dry_run=self.dry_run)
-            if optimize:
-                suffix = 'o'
-            else:
-                suffix = 'c'
-            self.outfiles.extend([f + suffix for f in compile_names])
+            self.outfiles.extend([f + 'o' for f in compile_names])
    # end of class install_data_with_bytecompile

    target = py2exe.build_exe.Target(script = "bzr",
@@ -692,7 +690,7 @@
                               "excludes": excludes,
                               "dll_excludes": dll_excludes,
                               "dist_dir": "win32_bzr.exe",
-                               "optimize": 1,
+                               "optimize": 2,
                              },
                   }






-- 
Martin <http://launchpad.net/~mbp/>
=== modified file 'setup.py'
--- setup.py	2010-04-08 04:34:03 +0000
+++ setup.py	2010-04-30 10:50:33 +0000
@@ -534,17 +534,15 @@
             install_data.run(self)
 
             py2exe = self.distribution.get_command_obj('py2exe', False)
-            optimize = py2exe.optimize
+            # GZ 2010-04-19: Setup has py2exe.optimize as 2, but give plugins
+            #                time before living with docstring stripping
+            optimize = 1
             compile_names = [f for f in self.outfiles if f.endswith('.py')]
             byte_compile(compile_names,
                          optimize=optimize,
                          force=self.force, prefix=self.install_dir,
                          dry_run=self.dry_run)
-            if optimize:
-                suffix = 'o'
-            else:
-                suffix = 'c'
-            self.outfiles.extend([f + suffix for f in compile_names])
+            self.outfiles.extend([f + 'o' for f in compile_names])
     # end of class install_data_with_bytecompile
 
     target = py2exe.build_exe.Target(script = "bzr",
@@ -692,7 +690,7 @@
                                "excludes": excludes,
                                "dll_excludes": dll_excludes,
                                "dist_dir": "win32_bzr.exe",
-                               "optimize": 1,
+                               "optimize": 2,
                               },
                    }