Rev 205: Change the build process for the dlls slightly. in http://bazaar.launchpad.net/~tortoisebzr-developers/tortoisebzr/trunk-2a

John Arbash Meinel john at arbash-meinel.com
Thu Nov 19 19:26:23 GMT 2009


At http://bazaar.launchpad.net/~tortoisebzr-developers/tortoisebzr/trunk-2a

------------------------------------------------------------
revno: 205
revision-id: john at arbash-meinel.com-20091119192602-uw57cpm9lxpbqlfq
parent: inada-n at klab.jp-20091031130028-2i1kye5ytivgvi2k
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: trunk-2a
timestamp: Thu 2009-11-19 13:26:02 -0600
message:
  Change the build process for the dlls slightly.
  
  We still want to try to unregister them, but a failure to unregister should
  not be considered a critical failure.
-------------- next part --------------
=== modified file 'setup.py'
--- a/setup.py	2009-10-31 13:00:28 +0000
+++ b/setup.py	2009-11-19 19:26:02 +0000
@@ -5,7 +5,7 @@
 
 from distutils.core import setup
 
-from distutils import log
+from distutils import errors, log
 from distutils.core import Command
 from distutils.command.build import build as std_build
 from distutils.dep_util import newer
@@ -155,8 +155,16 @@
             fqtarget = os.path.join(out_dir, target)
             if not os.path.isfile(fqtarget):
                 raise RuntimeError("Target '%s' failed to build" % fqtarget)
-            argv = ['regsvr32.exe', '/s', '/i:user', '/u', fqtarget]
-            self.spawn(argv)
+            argv = ['regsvr32.exe', '/c', '/s', '/i:user', '/u', fqtarget]
+            try:
+                self.spawn(argv)
+            except errors.DistutilsExecError:
+                # On a 32-bit host, trying to '/u' the 64-bit version seems to
+                # fail, so just ignore it.
+                sys.stderr.write(
+                'Failed to uninstall new dll: %s\n'
+                'This may not have been installed, especially the 64-bit version'
+                % (fqtarget,))
 
 
 class build(std_build):



More information about the bazaar-commits mailing list