Interesting problem: sometimes you want to build extensions with a newer version of the compiler than the python interpreter was built with. Sometimes you want to be smarter than the machine, so it would be very handy to have some manual override in msvccompiler.py, in get_build_version(), perhaps something like: if os.environ.has_key('MSVC_VERSION'): return float(os.environ['MSVC_VERSION']) This allows you as the smart developer to force the compilation of the extension to use whatever compiler version you set your environment to; if you don't set it, the system does what it does now. Thoughts? -Ivan
Ivan R. Judson wrote:
Interesting problem: sometimes you want to build extensions with a newer version of the compiler than the python interpreter was built with. The problem is that Microsoft feels free to redefine how function calls, for example, are translated between versions of their compiler. Calls across versions of Microsoft's C compiler are as fragile as calls between modules translated by different Python versions.
Sometimes you want to be smarter than the machine, so it would be very handy to have some manual override in msvccompiler.py, in get_build_version(), perhaps something like: Seems a dicey proposition to me. The chances of getting subtle bugs in the translation would rise as far as I can tell.
-Scott David Daniels Scott.Daniels@Acm.Org
Hey Scott, I understand the complexities and I also understand your concerns, the problem I'm trying to solve is that in some (albeit) rare cases, I know that I can, and in fact, need to, compile an extension with a different version of the compiler than the python interpreter was built with. I currently have to modify the installed modules in the python std library to do this. It seems to me that a solution that's put into that code that is disabled by default, but allows experienced developers to more finely tune the environment they are developing under is a better thing. I'm not saying the solution I proposed is however the best way to do that, it's just the one that I came up with that a) requires the minimum of code changes and b) the minimum of work for the developers who want to use it...I think! --Ivan
-----Original Message----- From: distutils-sig-bounces@python.org [mailto:distutils-sig-bounces@python.org] On Behalf Of Scott David Daniels Sent: Sunday, May 02, 2004 11:03 AM To: Distutils-Sig@Python.Org Subject: [Distutils] Re: Msvccompiler.py
Ivan R. Judson wrote:
Interesting problem: sometimes you want to build extensions with a newer version of the compiler than the python interpreter was built with. The problem is that Microsoft feels free to redefine how function calls, for example, are translated between versions of their compiler. Calls across versions of Microsoft's C compiler are as fragile as calls between modules translated by different Python versions.
Sometimes you want to be smarter than the machine, so it would be very handy to have some manual override in msvccompiler.py, in get_build_version(), perhaps something like: Seems a dicey proposition to me. The chances of getting subtle bugs in the translation would rise as far as I can tell.
-Scott David Daniels Scott.Daniels@Acm.Org
_______________________________________________ Distutils-SIG maillist - Distutils-SIG@python.org http://mail.python.org/mailman/listinfo/distutils-sig
participants (2)
-
Ivan R. Judson
-
Scott David Daniels