This is an archive of the discontinued Mercurial Phabricator instance.

automation: support building Windows wheels for Python 3.7 and 3.8
ClosedPublic

Authored by indygreg on Apr 23 2020, 11:28 PM.

Details

Summary

The time has come to support Python 3 on Windows.

Let's teach our automation code to produce Windows wheels for
Python 3.7 and 3.8.

We could theoretically support 3.5 and 3.6. But I don't think
it is worth it. People on Windows generally use the Mercurial
installers, not wheels. And I'd prefer we limit variability
and not have to worry about supporting earlier Python versions
if it can be helped.

As part of this, we change the invocation of pip to python.exe -m pip,
as this is what is being recommended in Python docs these days. And
it seemed to be required to avoid a weird build error. Why, I'm not
sure. But it looks like pip was having trouble finding a Visual Studio
files when invoked as pip.exe but not when using python.exe -m pip.
Who knows.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

indygreg created this revision.Apr 23 2020, 11:28 PM

Why do we even give the choice between 3.7 and 3.8? Just because it was easy to do so anyway? Since the Python runtime is embedded, there's very little reason to try to match a system Python or something, right? To be clear, I don't have an issue with allowing it; I was just surprised by it and wanted to make sure I understand it correctly.

This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.

Why do we even give the choice between 3.7 and 3.8? Just because it was easy to do so anyway? Since the Python runtime is embedded, there's very little reason to try to match a system Python or something, right? To be clear, I don't have an issue with allowing it; I was just surprised by it and wanted to make sure I understand it correctly.

For the installers, the runtime is embedded. The wheels are standalone, pre-compiled Python packages and installed via pip. The ABI is dependent on the OS, machine architecture, and Python version.

Personally, I would prefer that people install Mercurial via the installers so we can control the runtime. But some people (e.g. Mozilla and Python programmers) do install Mercurial via pip.