Showing content from http://mail.python.org/pipermail/python-dev/attachments/20180201/22b72e74/attachment.html below:
<div dir="ltr">TL;DR of Steve's post - MSVC is the compiler of choice for most serious software on Windows. So we use it to best integrate with the world. There is no compelling reason to change that.<div><br></div><div>The free-as-in-beer MSVC community edition is finally non-sucky (their earlier efforts were crippled, they seem to have learned the lesson)<div><br></div><div>There are other viable Windows compilers. If we want to support those in CPython someone needs to contribute the work to do so, ongoing maintenance, and buildbots. I'd love to see a Clang based Windows build (Google Chrome is built using that). But I have no motivating reason to do the work. I <i>believe</i> such a build could be made to integrate and inter-operate fully with MSVC builds and ABIs. We could <i>probably</i> even make cross-compilation of extensions from Linux -> Windows work that way.</div><div><br></div><div>We're highly unlikely to ever stop shipping <a href="http://python.org">python.org</a> Windows binaries built with anything other than MSVC unless Microsoft takes a turn toward the dark side again.</div><div><br></div><div>-gps</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Jan 31, 2018 at 3:07 PM Steve Dower <<a href="mailto:steve.dower@python.org">steve.dower@python.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="blue" vlink="#954F72"><div class="m_5432404546915127863WordSection1"><p class="MsoNormal"><span lang="EN-AU">Because every other supported platform builds using the native tools, so why shouldnât the one with the most users?<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">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.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">Meanwhile, most of the MinGW contributions have been complaints and drive-by patches. We (python-dev) are not opposed to supporting a second compiler for Windows, and honestly Iâd love for extensions built with other compilers to be fully compatible with our main binary release, but the sacrifice involved in switching is significant and thereâs no apparent commitment from the alternative options.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">(Note that Iâm not saying Microsoftâs support is conditional on our compiler being used. But our ability to contribute technically would be greatly reduced if we didnât have the inside access that we do.)<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">And as has been mentioned, MSVC was selected before the other options were feasible. Python is a much older tool than those others, and so uses the tools that were best at the time.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">So in my opinion at least, the reasoning for selecting MSVC was perfectly sound, and the reasoning for continuing with it is perfectly sound. Unwillingness on the part of package developers to not even test on Windows before releasing a wheel for it is not a compelling reason to change anything.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-AU">Cheers,<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-AU">Steve</span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Top-posted from my Windows phone</p><p class="MsoNormal"><u></u> <u></u></p><div style="border:none;border-top:solid #e1e1e1 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal" style="border:none;padding:0in"><b>From: </b><a href="mailto:olegs@traiana.com" target="_blank">Oleg Sivokon</a><br><b>Sent: </b>Thursday, February 1, 2018 5:40<br><b>To: </b><a href="mailto:python-dev@python.org" target="_blank">python-dev@python.org</a><br><b>Subject: </b>[Python-Dev] Why is Python for Windows compiled with MSVC?</p></div></div></div><div lang="EN-US" link="blue" vlink="#954F72"><div class="m_5432404546915127863WordSection1"><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hello list.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I'll give some background before asking my question in more detail.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">I've been tasked with writing some infrastructure code that needs to talk to Kubernetes. (Kubernetes is a popular software for managing and automating virtualization / containerization of cloud services). One of the requirements was that the code be written in Python 3.X.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">The tasks my code was supposed to perform on Kubernetes would be something like cluster creation from specification, deletion of all or parts of the cluster, providing realtime statistics of cluster usage etc. There were few prototype scripts written in Bash using kubectl (official client written in Go).</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">My first reaction was to look for an official client for Kubernetes written in Python. There is one official client for Kubernetes, with a single maintainer, impossible to parse documentation, containing mostly generated code. It is nigh impossible to use. Here I need to explain that for whatever reason Kubernetes team decided to write their HTTP API in such a way that the server is "dumb" and the client must be "smart" in order to do anything useful. For instance, if you have a description of your cluster, you cannot just send this description to the server and hope that it will know how to create the cluster from description. You need to make multiple API calls (perhaps hundreds of them) to arrange for the server to create the cluster from description.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Since the official client is no help (it really only mirrors the HTTP API), I searched for other clients. There are two more. None is in good shape, and none comes even close to being able to do what kubectl can.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">There is one more client that shells out calls to kubectl. It implements only a small subset of kubectl commands, and... it's a lot of parsing of standard output with regular expressions and magic.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Well... I was given a lot of time to investigate other options for dealing with this project, so I decided, what if I can compile kubectl into a shared library and write a Python extension that links against that library. And, indeed, after few days I came up with such an extension. It worked!.. On Linux...</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Now all I had to do was to re-create my success on Windows (most of the employees in my company use Windows). At first I thought that I'd cross-compile on Linux using MinGW. I compiled Go shared library into a DLL, then tried to compile my Python extension and... it didn't work. I downloaded VirtualBox and some Windows images, etc... tried to compile on Windows. It didn't work. I started asking around, and was told that even though for some earlier versions of Python this was kind of possible, for Python 3.5, 3.6 it is not. You must use MSVC to compile Python extensions. No way around it.</p><p class="MsoNormal">Now, since Go won't compile with MSVC, I'll have to scrap my project and spend many weeks re-implementing kubectl.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Here's my question: Why?</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Why did you choose to use non-free compiler, which also makes cross-compilation impossible? There wasn't really a reason not to choose MinGW as a way to compile extensions on Windows (Ruby does that, Go uses MinGW, perhaps some others too). It would've made things like CI and packaging so much easier... What do Python users / developers get from using MSVC instead?</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thank you.</p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Oleg</p><p class="MsoNormal">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 regi</p><p class="MsoNormal"> stered 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 <a href="http://www.NEX.com" target="_blank">www.NEX.com</a>.</p><p class="MsoNormal">_______________________________________________</p><p class="MsoNormal">Python-Dev mailing list</p><p class="MsoNormal"><a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a></p><p class="MsoNormal"><a href="https://mail.python.org/mailman/listinfo/python-dev" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a></p></div></div><div lang="EN-US" link="blue" vlink="#954F72"><div class="m_5432404546915127863WordSection1"><p class="MsoNormal">Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/steve.dower%40python.org" target="_blank">https://mail.python.org/mailman/options/python-dev/steve.dower%40python.org</a></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Python-Dev mailing list<br>
<a href="mailto:Python-Dev@python.org" target="_blank">Python-Dev@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-dev" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-dev</a><br>
Unsubscribe: <a href="https://mail.python.org/mailman/options/python-dev/greg%40krypto.org" rel="noreferrer" target="_blank">https://mail.python.org/mailman/options/python-dev/greg%40krypto.org</a><br>
</blockquote></div>
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4