Re: [Python-Dev] Why is Python for Windows compiled with MSVC?

so why shouldn’t the one with the most users?
Because it makes compilation difficult, and cross-compilatin completely impossible? Why is it difficult: a package maintainer needs to (1) buy MS Windows (2) create a special workflow for compiling on a different machine. This is both costly and inconsistent with free-as-in-freedom... It makes cross-compilation impossible because libraries produced by any tool that can run on all target platforms are incompatible with Python binaries on MS Windows. Again, many languages (i.e. projects similar in size an purpose to CPython) took a different approach: they use GNU compilers to be able to compile cross-platform. This is true for Ruby and Go at least. I would need to investigate further, but I think these two examples should be enough.
I’m likely biased because I work there and I’m the main intermediary with python-dev, but these days Microsoft is one of the strongest supporters of CPython. We employ the most core developers of any private company and we all are allowed work time to contribute, we provide full access to our development tools and platforms to all core developers and some prominent projects, we’ve made fixes, enhancements and releases or core products such as the CRT, MSVC, Visual Studio, Visual Studio Code, and Azure SPECIFICALLY to support CPython development and users. As far as I know, ALL the Windows buildbots are running on Azure subscriptions that Microsoft provides (though managed by some awesome volunteers). You’ll see us at PyCon US under the biggest banner and we’ll have a booth filled with engineers and not recruiters. Crash reports from thousands of opted-in users come into our systems and have directly lead to both CPython and Windows bug fixes.
Oh, so this is the real reason... well, corporate interests are hard to argue against. But, this is an interesting statistic nevertheless. Thanks for letting me know. Best. Oleg This communication and all information contained in or attached to it is confidential, intended solely for the addressee, may be legally privileged and is the intellectual property of one of the companies of NEX Group plc ("NEX") or third parties. If you are not the intended addressee or receive this message in error, please immediately delete all copies of it and notify the sender. We have taken precautions to minimise the risk of transmitting software viruses, but we advise you to carry out your own virus checks on any attachments. We do not accept liability for any loss or damage caused by software viruses. NEX reserves the right to monitor all communications. We do not accept any legal responsibility for the content of communications, and no communication shall be considered legally binding. Furthermore, if the content of this communication is personal or unconnected with our business, we accept no liability or responsibility for it. NEX Group plc is a public limited company registered in England and Wales under number 10013770 and certain of its affiliates are authorised and regulated by regulatory authorities. For further regulatory information please see www.NEX.com.

On 2018-02-01 10:19, Oleg Sivokon wrote:
so why shouldn’t the one with the most users?
Because it makes compilation difficult, and cross-compilatin completely impossible? Why is it difficult: a package maintainer needs to (1) buy MS Windows (2) create a special workflow for compiling on a different machine. This is both costly and inconsistent with free-as-in-freedom... It makes cross-compilation impossible because libraries produced by any tool that can run on all target platforms are incompatible with Python binaries on MS Windows.
Again, many languages (i.e. projects similar in size an purpose to CPython) took a different approach: they use GNU compilers to be able to compile cross-platform. This is true for Ruby and Go at least. I would need to investigate further, but I think these two examples should be enough.
I’m likely biased because I work there and I’m the main intermediary with python-dev, but these days Microsoft is one of the strongest supporters of CPython. We employ the most core developers of any private company and we all are allowed work time to contribute, we provide full access to our development tools and platforms to all core developers and some prominent projects, we’ve made fixes, enhancements and releases or core products such as the CRT, MSVC, Visual Studio, Visual Studio Code, and Azure SPECIFICALLY to support CPython development and users. As far as I know, ALL the Windows buildbots are running on Azure subscriptions that Microsoft provides (though managed by some awesome volunteers). You’ll see us at PyCon US under the biggest banner and we’ll have a booth filled with engineers and not recruiters. Crash reports from thousands of opted-in users come into our systems and have directly lead to both CPython and Windows bug fixes.
Oh, so this is the real reason... well, corporate interests are hard to argue against. But, this is an interesting statistic nevertheless. Thanks for letting me know.
You are drawing the wrong conclusion here. CPython has been using MSVC many years before Microsoft even started to sponsor MSDN subscriptions for core developers. MSVC is the default Windows compiler for over 20 years now. IIRC Microsoft started to donate MSDN subscription for about 5 years and Steve has been helping out with Windows improvement for about 5 years. Christian

On Thu, Feb 1, 2018 at 4:19 AM, Oleg Sivokon <olegs@traiana.com> wrote:
so why shouldn’t the one with the most users?
Because it makes compilation difficult, and cross-compilatin completely impossible? Why is it difficult: a package maintainer needs to (1) buy MS Windows (2) create a special workflow for compiling on a different machine. This is both costly and inconsistent with free-as-in-freedom... It makes cross-compilation impossible because libraries produced by any tool that can run on all target platforms are incompatible with Python binaries on MS Windows.
Again, many languages (i.e. projects similar in size an purpose to CPython) took a different approach: they use GNU compilers to be able to compile cross-platform. This is true for Ruby and Go at least. I would need to investigate further, but I think these two examples should be enough.
They should be enough for *what*, though? You can tell people what everyone else is doing, but the difference between that and what we have is someone's time and effort.
I’m likely biased because I work there and I’m the main intermediary with python-dev, but these days Microsoft is one of the strongest supporters of CPython. We employ the most core developers of any private company and we all are allowed work time to contribute, we provide full access to our development tools and platforms to all core developers and some prominent projects, we’ve made fixes, enhancements and releases or core products such as the CRT, MSVC, Visual Studio, Visual Studio Code, and Azure SPECIFICALLY to support CPython development and users. As far as I know, ALL the Windows buildbots are running on Azure subscriptions that Microsoft provides (though managed by some awesome volunteers). You’ll see us at PyCon US under the biggest banner and we’ll have a booth filled with engineers and not recruiters. Crash reports from thousands of opted-in users come into our systems and have directly lead to both CPython and Windows bug fixes.
Oh, so this is the real reason... well, corporate interests are hard to argue against. But, this is an interesting statistic nevertheless. Thanks for letting me know.
I think that's a mischaracterization of the situation. The MS toolchain was chosen some time long before I (or Steve) got involved, and when I upgraded us from VS2008 to VS2010 for 3.3 ~6 years ago I had several messages similar to this thread. As much as Steve is unlikely to do the work to initiate and maintain support of these other tools—whether due to his employer's interests or his own—I too was unlikely to do work like this thread is asking. In fact, the chances I would have done it were zero because I was sitting on my couch upgrading our Visual Studio versions because it let me do better stuff at my day job, though I was always open to review patches that supported alternatives without major disruption. However, they never came. I suspect the same could be said of Martin and anyone else working in this area prior to that, because nothing has really changed. Like the previous times this sort of question has come up—and really, for any question on this list—it ultimately turns into a matter of how much the solution is wanted and how much effort people are willing to give to make it happen. Historically, the former has had small amounts, and the latter has had much smaller amounts. Without a change there I don't think one will materialize in a released version of Python. Brian

As much as Steve is unlikely to do the work to initiate and maintain support of these other tools—whether due to his employer's interests or his own—I too was unlikely to do work like this thread is asking. In fact, the chances I would have done it were zero because I was sitting on my couch upgrading our Visual Studio versions because it let me do better stuff at my day job, though I was always open to review patches that supported alternatives without major disruption. However, they never came. I suspect the same could be said of Martin and anyone else working in this area prior to that, because nothing has really changed.
It would be cool though if Microsoft started providing a cross-compiler running on Linux. This could even be the only compiler shipped with Visual Studio, now that Windows can run Linux userland. Cross-compilers from Microsoft would not be totally unheard of. IIRC, the last DOS versions (Visual C++ 1.5x) were Win32 binaries building for DOS 16 bit. Technically speaking, using a 32 bit compiler for building for 64 bit Windows or the other way around would probably count as cross-compilation anyway.

On Feb 1, 2018, at 04:19, Oleg Sivokon <olegs@traiana.com> wrote:
Oh, so this is the real reason... well, corporate interests are hard to argue against. But, this is an interesting statistic nevertheless. Thanks for letting me know.
Maybe it hasn’t happened because no volunteer has stepped up to do it. Or maybe no corporation thinks it a good business investment to pay employees to do it. What other options are there, and if none, then which of those can you solve? Or to paraphrase a timeless quote: Ask not what Python can do for you, ask what you can do for Python. -Barry
participants (5)
-
Barry Warsaw
-
Brian Curtin
-
Christian Heimes
-
Oleg Sivokon
-
Stefan Ring