classification
Title: embed manifest in windows extensions
Type: enhancement Stage:
Components: Distutils Versions: Python 2.6
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: mhammond Nosy List: aheider, christian.heimes, mhammond, trent
Priority: normal Keywords: patch

Created on 2008-04-06 13:52 by mhammond, last changed 2009-01-19 10:39 by mhammond. This issue is now closed.

Files
File name Uploaded Description Edit
embed_manifest.patch mhammond, 2008-04-06 13:52 embed the manifest using mt.exe
Messages (6)
msg65034 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-04-06 13:52
The move to vs2008 has caused .manifest files to be created next to
distutils created extensions modules, rather than being embedded as
recommended by Microsoft.

See http://msdn2.microsoft.com/en-us/library/ms235591(VS.80).aspx

The attached patch achieves this by telling the compiler to generate the
manifest in the temp dir, them embeds that manifest using mt.exe

Adding Christian for comment (hopefully the correct Christian this time
  - sorry about that :)
msg65160 - (view) Author: Trent Nelson (trent) * (Python committer) Date: 2008-04-08 13:52
+1 from me on principle (haven't tested).
msg65164 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2008-04-08 14:08
Yes, it's me ;)

I'm +1 on the feature but I haven't reviewed your patch. IIRC and unless
I'm not mistaken you can tell the linker to embed the manifest without
the extra mt.exe dance.
msg65218 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-04-08 21:13
Note that we are actually using the linker to *generate* the manifest
(something linkers pre VC2005 couldn't do), so if we could tell the
linker to skip that manifest generation and embed it directly in the
DLL, it would certainly be easier.  But, IIRC (which I may not), you can
embed a manifest directly via the linker by converting the manifest to a
resource and linking that - however, that conversion still requires an
extra tool.  This is the alternative process outlined on the MS page I
linked to.  And finally, it seems Visual Studio itself embeds the
resource this way.

So if there is a way to embed the manifest without an additional step, I
don't know about it :)
msg74724 - (view) Author: Andre Heider (aheider) Date: 2008-10-14 08:14
Note that this patch will break the loading of compiled modules on
machines without the MS CRT redistributable installed.

See Issue 4120
msg80157 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2009-01-19 10:39
Given bug 4120, this seems the most appropriate resolution...
History
Date User Action Args
2009-01-19 10:39:23mhammondsetstatus: open -> closed
keywords: patch, patch
resolution: out of date
messages: + msg80157
2008-10-14 08:14:52aheidersetnosy: + aheider
messages: + msg74724
2008-04-08 21:13:36mhammondsetkeywords: patch, patch
messages: + msg65218
2008-04-08 14:08:35christian.heimessetkeywords: patch, patch
messages: + msg65164
2008-04-08 13:52:37trentsetkeywords: patch, patch
nosy: + trent
messages: + msg65160
2008-04-06 13:52:28mhammondcreate