[Patches] [ python-Patches-601314 ] build_ext forgets libraries par w MSVC

noreply@sourceforge.net noreply@sourceforge.net
Wed, 28 Aug 2002 13:20:00 -0700


Patches item #601314, was opened at 2002-08-28 15:59
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=601314&group_id=5470

Category: Distutils and setup.py
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Wolfgang Strobl (strobl)
Assigned to: Thomas Heller (theller)
Summary: build_ext forgets libraries par w MSVC

Initial Comment:
Including additional link libraries by specifiying the 
libraries parameter in the Extension class call in 
setup.py fails, when using the MSVC compiler, the 
parameter silently gets ignored.

This is caused by a bug in build_ext which has been 
introduced through the addition of cygwin support from 
1.69 to 1.70 in 9/2000.  

"get_libraries" SHOULD return ext.libraries per default. 
Currently, it falls through and returns None, if the 
platform is WIN32 and the compiler is MSVCCompiler. 

I noticed this while trying to build the bsddb3 python 
extension for win32. A necessary library libdb40s  was 
specified in setup.py, but the build failed because the 
value never got through to the linker.

The attached patch adds a single "return ext.libraries" at 
the end of the case "win32", as a catch all. This fixes 
the problem.


----------------------------------------------------------------------

>Comment By: Wolfgang Strobl (strobl)
Date: 2002-08-28 22:20

Message:
Logged In: YES 
user_id=311771

Sourceforge currently doesn't display any versions to me 
("There are 26 files, but none match the current tag ()"), so I 
can't check again. 
But I took a look into 1.77 from the Windows ActivePython 
python22 distro, instead . 

You are right: the "win32" has changed from "if win32 and 
msvc"
if win32:
   if msvc
   return
somewhere between 1.77 and now.


----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2002-08-28 21:17

Message:
Logged In: YES 
user_id=11105

The patch looks good.
But I think you are wrong with the versions numbers. My 
Python 2.2.1 build_ext.py module doesn't seem to have this 
bug, it's version is 1.77.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=601314&group_id=5470