Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3839d99

Browse files
committed
Issue #13756: Fix building extensions modules on Cygwin
Patch by Roumen Petrov, based on original patch by Jason Tishler.
1 parent e999e96 commit 3839d99

4 files changed

Lines changed: 5 additions & 9 deletions

File tree

Lib/distutils/command/build_ext.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -715,13 +715,6 @@ def get_libraries(self, ext):
715715
return ext.libraries + [pythonlib]
716716
else:
717717
return ext.libraries
718-
elif sys.platform[:6] == "cygwin":
719-
template = "python%d.%d"
720-
pythonlib = (template %
721-
(sys.hexversion >> 24, (sys.hexversion >> 16) & 0xff))
722-
# don't extend ext.libraries, it may be shared with other
723-
# extensions, it is a reference to the original list
724-
return ext.libraries + [pythonlib]
725718
elif sys.platform[:6] == "atheos":
726719
from distutils import sysconfig
727720

Makefile.pre.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \
674674

675675
# This rule builds the Cygwin Python DLL and import library if configured
676676
# for a shared core library; otherwise, this rule is a noop.
677-
$(DLLLIBRARY) libpython$(VERSION).dll.a: $(LIBRARY_OBJS)
677+
$(DLLLIBRARY) libpython$(LDVERSION).dll.a: $(LIBRARY_OBJS)
678678
if test -n "$(DLLLIBRARY)"; then \
679679
$(LDSHARED) -Wl,--out-implib=$@ -o $(DLLLIBRARY) $^ \
680680
$(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST); \

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ Windows
173173
Build
174174
-----
175175

176+
- Issue #13756: Fix building extensions modules on Cygwin. Patch by Roumen
177+
Petrov, based on original patch by Jason Tishler.
178+
176179
- Issue #21085: Add configure check for siginfo_t.si_band, which Cygwin does
177180
not provide. Patch by Masayuki Yamamoto with review and rebase by Erik Bray.
178181

Modules/makesetup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ CYGWIN*) if test $libdir = .
9191
else
9292
ExtraLibDir='$(LIBPL)'
9393
fi
94-
ExtraLibs="-L$ExtraLibDir -lpython\$(VERSION)";;
94+
ExtraLibs="-L$ExtraLibDir -lpython\$(LDVERSION)";;
9595
esac
9696

9797
# Main loop

0 commit comments

Comments
 (0)