After a recuring error with the newest python2 package, i incorporated a small fix.

The patch is attached to the message and replaces the patch with the same name.

diff -urN Python-2.7.12.old/Lib/distutils/cygwinccompiler.py 
Python-2.7.12/Lib/distutils/cygwinccompiler.py
--- Python-2.7.12.old/Lib/distutils/cygwinccompiler.py  2016-06-25 
23:49:30.000000000 +0200
+++ Python-2.7.12/Lib/distutils/cygwinccompiler.py      2016-10-22 
10:49:09.530796800 +0200
@@ -222,7 +222,7 @@
 
             # dllwrap uses different options than gcc/ld
             if self.linker_dll == "dllwrap":
-                extra_preargs.extend(["--output-lib", lib_file])
+                extra_preargs.extend(["-out-implib=" + lib_file])
                 # for dllwrap we have to use a special option
                 extra_preargs.extend(["--def", def_file])
             # we use gcc/ld here and can be sure ld is >= 2.9.10
@@ -415,7 +415,7 @@
     from distutils.spawn import find_executable
     import re
 
-    gcc_exe = find_executable('gcc')
+    gcc_exe = os.environ.get('CC') or find_executable('gcc')
     if gcc_exe:
         out = os.popen(gcc_exe + ' -dumpversion','r')
         out_string = out.read()
@@ -427,7 +427,7 @@
             gcc_version = None
     else:
         gcc_version = None
-    ld_exe = find_executable('ld')
+    ld_exe = os.environ.get('LD') or find_executable('ld')
     if ld_exe:
         out = os.popen(ld_exe + ' -v','r')
         out_string = out.read()
@@ -439,7 +439,7 @@
             ld_version = None
     else:
         ld_version = None
-    dllwrap_exe = find_executable('dllwrap')
+    dllwrap_exe = os.environ.get('DLLWRAP') or find_executable('dllwrap')
     if dllwrap_exe:
         out = os.popen(dllwrap_exe + ' --version','r')
         out_string = out.read()
diff -urN Python-2.7.12.old/Tools/msi/msi.py Python-2.7.12/Tools/msi/msi.py
--- Python-2.7.12.old/Tools/msi/msi.py  2016-06-25 23:49:32.000000000 +0200
+++ Python-2.7.12/Tools/msi/msi.py      2016-10-22 10:50:02.542828900 +0200
@@ -142,7 +142,7 @@
         return False
 
     gendef_command = '%s - %s' % (gendef, dll_path)
-    dlltool_command = "%s --dllname %s --def %s --output-lib %s" % \
+    dlltool_command = "%s --dllname %s --def %s -out-implib=%s" % \
         (dlltool, dll_file, def_file, mingw_lib)
     if msilib.Win64:
         dlltool_command += " -m i386:x86-64"
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Msys2-users mailing list
Msys2-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/msys2-users

Reply via email to