[meld/windows-fixes] build_helpers: Fix windows build for cx_Freeze internal changes



commit da79fcec9c73deedcba46d2de0d6366c528d769a
Author: Kai Willadsen <kai willadsen gmail com>
Date:   Tue Aug 9 08:05:46 2022 +1000

    build_helpers: Fix windows build for cx_Freeze internal changes
    
    The way cx_Freeze customised distutils behaviour changed, which
    interfered with our distutils overrides. This broke the binary win32
    build since we tried to ship without resources, etc.

 meld/build_helpers.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/meld/build_helpers.py b/meld/build_helpers.py
index 3240d667..0d67f9b3 100644
--- a/meld/build_helpers.py
+++ b/meld/build_helpers.py
@@ -41,6 +41,11 @@ except ImportError:
             'install paths may be incorrect', file=sys.stderr)
 
 windows_build = os.name == 'nt'
+if windows_build:
+    import cx_Freeze
+    command_base = cx_Freeze
+else:
+    command_base = distutils
 
 
 def has_help(self):
@@ -59,7 +64,7 @@ def has_data(self):
     return "build_data" in self.distribution.cmdclass
 
 
-distutils.command.build.build.sub_commands.extend([
+command_base.command.build.Build.sub_commands.extend([
     ("build_i18n", has_i18n),
     ("build_icons", has_icons),
     ("build_help", has_help),


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]