[Python-checkins] cpython: Issue #13756: Fix building extensions modules on Cygwin

zach.ware python-checkins at python.org
Sat Oct 1 17:15:19 EDT 2016


https://hg.python.org/cpython/rev/5b4c21436036
changeset:   104215:5b4c21436036
user:        Zachary Ware <zachary.ware at gmail.com>
date:        Sat Oct 01 16:15:09 2016 -0500
summary:
  Issue #13756: Fix building extensions modules on Cygwin

Patch by Roumen Petrov, based on original patch by Jason Tishler.

files:
  Lib/distutils/command/build_ext.py |  7 -------
  Makefile.pre.in                    |  2 +-
  Misc/NEWS                          |  3 +++
  Modules/makesetup                  |  2 +-
  4 files changed, 5 insertions(+), 9 deletions(-)


diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -715,13 +715,6 @@
                 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
 
diff --git a/Makefile.pre.in b/Makefile.pre.in
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -674,7 +674,7 @@
 
 # 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); \
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -173,6 +173,9 @@
 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.
 
diff --git a/Modules/makesetup b/Modules/makesetup
--- a/Modules/makesetup
+++ b/Modules/makesetup
@@ -91,7 +91,7 @@
 	 else
 	 	ExtraLibDir='$(LIBPL)'
 	 fi
-	 ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
+	 ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
 esac
 
 # Main loop

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list