classification
Title: _remove_visual_c_ref in distutils.msvc9compiler causes DLL load fail with embedded Python and multiple CRT versions
Type: enhancement Stage: resolved
Components: Distutils, Distutils2, Library (Lib) Versions: Python 3.3
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: tarek Nosy List: Inverness, alexis, eric.araujo, loewis, mhammond, tarek, vstinner
Priority: normal Keywords:

Created on 2011-11-02 01:17 by Inverness, last changed 2019-05-15 02:40 by vstinner. This issue is now closed.

Messages (4)
msg146821 - (view) Author: (Inverness) Date: 2011-11-02 01:17
I am using a custom Python executable for an application I'm developing. I also build PYDs to extend this Python environment. I decided to upgrade them and my executable to use Visual C++ 10 while the Python DLL and other third party PYDs, specifically wxPython, continued to use Visual C++ 9. Doing this did not cause an issue in and of itself, however, my wxPython release, but not debug, PYDs were failing to load the VC9 CRT.

I discovered this is a result of MSVCCompiler._remove_visual_c_ref() being called in the module disutils.msvc9compiler. I had to comment out this line in order to rebuild wxPython and get my program running correctly.

I'm requesting this feature of the compiler be made optional.
msg146847 - (view) Author: √Čric Araujo (eric.araujo) * (Python committer) Date: 2011-11-02 16:51
Mark, can you give feedback?
msg146876 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2011-11-02 21:05
I can't explain why this might be happening given the Python dll is still build against vc9 - I'm guessing this can't be reproduced without vs10 in the mix?

Re making the feature optional - distutils doesn't really lend itself to customizing the compiler best I can tell - the only answer I know of here is to provide your own compiler sub-class and override manifest_get_embed_info to return the manifest filename.
msg342535 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2019-05-15 02:40
No activity for 8 years, I close the issue.
History
Date User Action Args
2019-05-15 02:40:25vstinnersetstatus: open -> closed

nosy: + vstinner
messages: + msg342535

resolution: out of date
stage: resolved
2011-11-02 21:05:14mhammondsetmessages: + msg146876
2011-11-02 16:51:43eric.araujosetnosy: + mhammond
messages: + msg146847
2011-11-02 02:00:15pitrousetnosy: + loewis, eric.araujo, alexis, tarek

assignee: tarek
components: + Distutils, Distutils2
versions: + Python 3.3, - Python 2.7
2011-11-02 01:17:13Invernesscreate