Skip to content

Commit

Permalink
Issue python#13756: Fix building extensions modules on Cygwin
Browse files Browse the repository at this point in the history
Patch by Roumen Petrov, based on original patch by Jason Tishler.
  • Loading branch information
zware committed Oct 1, 2016
1 parent e999e96 commit 3839d99
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
7 changes: 0 additions & 7 deletions Lib/distutils/command/build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -715,13 +715,6 @@ def get_libraries(self, ext):
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

Expand Down
2 changes: 1 addition & 1 deletion Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -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); \
Expand Down
3 changes: 3 additions & 0 deletions Misc/NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion Modules/makesetup
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3839d99

Please sign in to comment.