From 23031e941eaab013ef65ed7b2cdb08742a72e68d Mon Sep 17 00:00:00 2001 From: Roumen Petrov Date: Sat, 2 Feb 2013 00:04:12 +0200 Subject: [PATCH 1/5] CYGWIN-issue13756: Python make fail on cygwin --- Lib/distutils/command/build_ext.py | 7 ------- Makefile.pre.in | 4 ++-- Modules/makesetup | 2 +- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Lib/distutils/command/build_ext.py b/Lib/distutils/command/build_ext.py index f7c71b3..eac04a5 100644 --- a/Lib/distutils/command/build_ext.py +++ b/Lib/distutils/command/build_ext.py @@ -705,13 +705,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 diff --git a/Makefile.pre.in b/Makefile.pre.in index 9570730..5190f4f 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -556,9 +556,9 @@ $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK): \ $(LN) -fsn Versions/Current/$(PYTHONFRAMEWORK) $(PYTHONFRAMEWORKDIR)/$(PYTHONFRAMEWORK) $(LN) -fsn Versions/Current/Resources $(PYTHONFRAMEWORKDIR)/Resources -# This rule builds the Cygwin Python DLL and import library if configured +# This rule builds the 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/Modules/makesetup b/Modules/makesetup index 40dfa9d..1a1fcf6 100755 --- a/Modules/makesetup +++ b/Modules/makesetup @@ -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 -- 1.7.12.1