[issue13756] Python3.2.2 make fail on cygwin

Roumen Petrov report at bugs.python.org
Sat Feb 2 16:45:23 CET 2013


Roumen Petrov added the comment:

Jason Tishler wrote:
> Jason Tishler added the comment:
>
>> Is this still an issue on 3.3/3.4?
> I presume so.
This build is broken since SOABI implementation.
>
>> Does the patch still work?
> I haven't tried it on 3.3 yet, so I don't know if it will apply cleanly.
Attached "0001-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch" for head.
This patch is part of split issue3871 into small independent changes.

Roumen

----------
Added file: http://bugs.python.org/file28934/0001-CYGWIN-issue13756-Python-make-fail-on-cygwin.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13756>
_______________________________________
-------------- next part --------------
>From 23031e941eaab013ef65ed7b2cdb08742a72e68d Mon Sep 17 00:00:00 2001
From: Roumen Petrov <local at example.net>
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



More information about the Python-bugs-list mailing list