]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #13756: Fix building extensions modules on Cygwin
authorZachary Ware <zachary.ware@gmail.com>
Sat, 1 Oct 2016 21:15:09 +0000 (16:15 -0500)
committerZachary Ware <zachary.ware@gmail.com>
Sat, 1 Oct 2016 21:15:09 +0000 (16:15 -0500)
Patch by Roumen Petrov, based on original patch by Jason Tishler.

Lib/distutils/command/build_ext.py
Makefile.pre.in
Misc/NEWS
Modules/makesetup

index 74de782d8a66891f5fa50347455f2ff50c9c5e4e..9155626a471d77be27e3d5c69f9f99cc01d79386 100644 (file)
@@ -715,13 +715,6 @@ class build_ext(Command):
                 return ext.libraries + [pythonlib]
             else:
                 return ext.libraries
-        elif sys.platform[:6] == "cygwin":
-            template = "python%d.%d"
-            pythonlib = (template %
-                   (sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
-            # don't extend ext.libraries, it may be shared with other
-            # extensions, it is a reference to the original list
-            return ext.libraries + [pythonlib]
         elif sys.platform[:6] == "atheos":
             from distutils import sysconfig
 
index a2174cea8b60aa7ebdc116b79982092bdb61fd7d..ce5296eb29b3a3f830a2478e3a56e0dfeb2cefa9 100644 (file)
@@ -674,7 +674,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
 
 # This rule builds the Cygwin Python DLL and import library if configured
 # for a shared core library; otherwise, this rule is a noop.
-$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
+$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
        if test -n "$(DLLLIBRARY)"; then \
                $(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
                        $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \
index 9d48ff8a0d664d8e5c9d87e8c299bf921c894b88..340f91d4b100f6fde352279a7c01931d6e051462 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -173,6 +173,9 @@ Windows
 Build
 -----
 
+- Issue #13756: Fix building extensions modules on Cygwin.  Patch by Roumen
+  Petrov, based on original patch by Jason Tishler.
+
 - Issue #21085: Add configure check for siginfo_t.si_band, which Cygwin does
   not provide.  Patch by Masayuki Yamamoto with review and rebase by Erik Bray.
 
index 3297b78a20d3dc0f7593145bd12d4a4b8d32c705..b87233758e34a77cd468f0cf78f253fac9f2645a 100755 (executable)
@@ -91,7 +91,7 @@ CYGWIN*) if test $libdir = .
         else
                ExtraLibDir='$(LIBPL)'
         fi
-        ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+        ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
 esac
 
 # Main loop