Domanda

What is the preferred way to embed a manifest with a C Extension DLL when I generate it through distutil. Currently when I build a C Extension as part of the distutil process, it creates a manifest and the corresponding *.pyd but when I check the dependency using dependency walker,

enter image description here

But if I manually embed the manifest

mt -manifest jep.pyd.manifest -outputresource:jep.pyd;2
Microsoft (R) Manifest Tool version 6.2.9200.16384
Copyright (c) Microsoft Corporation 2012.
All rights reserved.

The dependency gets satisfied

enter image description here

What is the suggested way to overcome the manual process to embed the manifest. Can this be done through distutil automatically?

È stato utile?

Soluzione

Python extension DLLs are not expected to have the MSVCR manifest. You can take a look at the extension DLLs that ship with Python (e.g. _bz2.pyd, _ctypes.pyd, _lzma.pyd, _tkinter.pyd etc.) and you will see that they do not contain a manifest resource.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top