Mach still recommends installing Visual Studio 2008 for Python binaries
Categories
(Firefox Build System :: Mach Core, defect, P3)
Tracking
(firefox77 fixed)
Tracking | Status | |
---|---|---|
firefox77 | --- | fixed |
People
(Reporter: saschanaz, Assigned: rstewart)
Details
Attachments
(1 file)
0:14.70 c:\Users\Kagami\Documents\GitHub\gecko-dev\python\mozbuild\mozbuild\virtualenv.py:457: UserWarning: Hacking environment to allow binary Python extensions to build. You can make this warning go away by installing Visual Studio 2008. You can download the Express Edition installer from http://go.microsoft.com/?linkid=7729279
0:14.70 warnings.warn('Hacking environment to allow binary Python '
0:14.74 Error processing command. Ignoring because optional. (optional:packages.txt:comm/build/virtualenv_packages.txt)
This is now an invalid recommendation. Microsoft got a separate VC90 installer for Python 2.7, we should recommend it instead: https://www.microsoft.com/en-us/download/details.aspx?id=44266
Or we might just remove it given that its optional and we are migrating to Python 3.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
This warning dates from bug 910487, which was 7 years ago. Since joining Mozilla I have always gotten this warning, and as far as I can tell since I never had a pre-2019 version of Visual Studio on my dev machine, the VS90COMNTOOLS variable was never set. Moreover, the "hack" is written in such a way that it does nothing unless you have VS{100,110,120}COMNTOOLS
set, which I never have on my machine either, as you might expect since I only have the one version of Visual Studio installed.
The latest public build documentation recommends that you install the Community edition of Visual Studio 2019, and as of 2019 the variable that's being used is VS160COMNTOOLS
, so the only way someone would get value out of this hack is if they're using a substantially older version of Visual Studio than we recommend anyway.
Since 1) I suspect the hack is not doing anything for the large majority, if not all, of the people currently running builds on Windows on a day-to-day basis and 2) even if the hack continues to do something useful under some hypothetical scenarios, the content of the hack as well as the corresponding warning is so outdated that it should be updated anyway, I propose deleting it entirely.
Updated•4 years ago
|
Pushed by rstewart@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3f6c57853e5f Delete "hacking environment to allow binary Python" message and corresponding hack. r=dmajor
Comment 3•4 years ago
|
||
I think the patch is fine, but the reasoning is incorrect. I think that hack existed because python 2.7 was compiled with a specific version of visual studio, and hard-coded some of the details of the version of visual studio into the produced binaries. That version of visual studio also predates (IIUC) microsoft having a good story for forwards compatibility between SDK versions. That is why https://www.microsoft.com/en-ca/download/details.aspx?id=44266 exists (which is a easily downloadable version of the bits of visual studio 2008 need for compiling python extensions). The reason that removing that hack is fine, is because Bug 1481612 vendored a version of psutil for windows, which was the main reason we needed to compile cpython extensions. (Also that we are quickly moving to python 3 everywhere, which (at least recent versions) are compiled with a modern vscode that has better cross-version support.)
Comment 4•4 years ago
|
||
bugherder |
Description
•