Hi all (and especially Mark),

My company is in the process of updating all its code and tools to their
latest (or at least most up-to-date and still compatible) versions, and
has therefore switched to using VS2010 for building all its code, and
updated its python codebase for Python2.7.x.  However, I recently
discovered that Python 2.7.x is only compiled with VS2008, and as such,
python interpreters embedded in my VS2010-compiled executables won't
work unless I build them with an explicit /MANIFESTDEPENDENCY line of
the form:

/MANIFESTDEPENDENCY:"type='Win32' name='Microsoft.VC90.CRT'
version='9.0.21022.8' processorArchitecture='X86'
publicKeyToken='1fc8b3b9a1e18e3b' "

With this trick, discovered in another search result
(http://bugs.python.org/issue7833), I can then import python modules and
extension modules without incident into my embedded interpreter inside
my VS2010-built executable without complaint.

However, we also build an extension module (.pyd) that allows our Python
code can access some of our C++ library functions.  Unfortunately, this
won't import into the Python 2.7 interpreter, presumably because it
contains a manifest that references the VS2010 runtime libs.  I read
that most of the extension modules are stripped of their manifests, but
I have not found any recipe or set of instructions for achieving this.
I have done some experiments to try to eliminate it using the UI, but
none of these have been effective.  

So...
Can someone tell me how to build our .pyd in VS2010 such that it doesn't
have a manifest, and thus can be loaded by the Python2.7 interpreter? 

(Also, note that, up to now, we have never used distutils to build or
distribute the .pyd, as it is only bundled with our application to allow
its python to access some C++ functions we didn't want to have 2
codebases for; if it's required, I will need some pretty "face the
stove" instructions!)

Thanks in advance,
/Will Sadkin
Parlance Corporation

PS: Is there any growing pressure to make Python compatible with the
latest compiler from Microsoft, now almost 2 years old?!?
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to