Issue 601314: build_ext forgets libraries par w MSVC (original) (raw)

Created on 2002-08-28 13:59 by strobl, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
build_ext.patch strobl,2002-08-28 13:59 patch build_ext.py
Messages (4)
msg41043 - (view) Author: Wolfgang Strobl (strobl) Date: 2002-08-28 13:59
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.
msg41044 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2002-08-28 19:17
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.
msg41045 - (view) Author: Wolfgang Strobl (strobl) Date: 2002-08-28 20:20
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.
msg41046 - (view) Author: Thomas Heller (theller) * (Python committer) Date: 2003-02-05 17:28
Logged In: YES user_id=11105 Has long been checked in. Why didn't I close this?
History
Date User Action Args
2022-04-10 16:05:37 admin set github: 37098
2002-08-28 13:59:02 strobl create