← Back to team overview

bzr-windows team mailing list archive

Re: python 2.6 + msvc2008express + manifest files for pyd

 

John Arbash Meinel пишет:
On 5/13/2011 11:10 AM, Alexander Belchenko wrote:
Alexander Belchenko пишет:
While building C extensions I've noticed that msvc has created
manifest file for every pyd file, see attached one of them.
Now actually attached.


This is the one I'm using:

C:\Program Files\Microsoft Visual Studio 9.0\VC>cl /?
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01
for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

MSVC2008 is Visual Studion 9.0, that's correct.

Setting environment for using Microsoft Visual Studio 2008 x86 tools.

C:\Program Files\Microsoft Visual Studio 9.0\VC>cl /?
Оптимизирующий 32-разрядный компилятор Microsoft (R) C/C++ версии 15.00.30729.01
 для 80x86
(C) Корпорация Майкрософт (Microsoft Corporation). Все права защищены.

Sorry for russian.

I'm not really sure whether that is 2008 or something older. I do see
that I have a beta version of VS 10.

As I understand it Python 2.6 and 2.7 are built with MSVC2008, err VS 9.0, so I should use the same to build extensions.

Manifests should generally be bundled with the dlls they are associated
with. *However* there is a way to tell the linker/compiler/whatever to
embed the manifest into the dll itself.

I don't remember how to do it, but I do remember running into it.
http://msdn.microsoft.com/en-us/library/ms235591%28VS.80%29.aspx

And when I run "py setup.py build_ext -i" this is what I see:

...
C:\Program Files\Microsoft Visual Studio 9.0\VC\BIN\link.exe /DLL /nologo /INCREMENTAL:NO /LIBPATH:C
:/local/lib /LIBPATH:C:\Python26\libs /LIBPATH:C:\Python26\PCbuild /EXPORT:init_groupcompress_pyx bu
ild\temp.win32-2.6\Release\bzrlib\_groupcompress_pyx.obj build\temp.win32-2.6\Release\bzrlib/diff-de
lta.obj /OUT:C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\_groupcompress_pyx.pyd /IMPLIB:build\temp.win3
2-2.6\Release\bzrlib\_groupcompress_pyx.lib /MANIFESTFILE:build\temp.win32-2.6\Release\bzrlib\_group
compress_pyx.pyd.manifest
   Creating library build\temp.win32-2.6\Release\bzrlib\_groupcompress_pyx.lib and object build\temp
.win32-2.6\Release\bzrlib\_groupcompress_pyx.exp
C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.6\Rele
ase\bzrlib\_groupcompress_pyx.pyd.manifest -outputresource:C:\Users\jameinel\dev\bzr\bzr.dev\bzrlib\
_groupcompress_pyx.pyd;2


So we are already calling "mt.exe -manifest".

My guess is that, no, we don't need to include the .xml file because we
are already bundling the manifest into the .pyd file.

OK, so python distutils is already care about that. Great.

John
=:->

--
All the dude wanted was his rug back


References