-
Notifications
You must be signed in to change notification settings - Fork 290
ci: fix choco usage #649
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: fix choco usage #649
Conversation
Looks to me that Microsoft has finally killed of VS for Python 2.7? https://www.microsoft.com/en-us/download/details.aspx?id=44266 redirects to https://www.microsoft.com/en-us/download/404Error.aspx |
Wow, yeah you might be right! But it's very abrupt... also the package is still in the chocolately By the way @henryiii, how was your style normalisation work coming along? This might be a nice time to merge the drop 2.7 branch #596 ! :) |
Let's give it a little time; not sure who to contact about it but it would be nice to get confirmation if this was intentional. The chocolaty package is not "official", so it isn't likely to be removed in sync with the old download. I can't find any statement saying they planned to drop the download, but the download is still missing. If we do have to drop this old workaround, we need to drop it on the v1 branch anyway so that our CI isn't dead for supporting the LTS version. My secret target date for 596 is when 3.5 gets dropped from manylinux (May 1) so we can remove both at the same time. Sadly, manylinux1 will keep supporting both, so v1 can stay as is. First batch (style in bin) is either done or almost done, then I'll do |
I've contacted Microsoft support, and:
It also says on the VS page:
So maybe someone will put pressure on them to restore it and it might show up again (I'm not going to do that!), but currently the plan is that it's gone and will stay that way. |
No idea what happened with the Azure run, it said 'Cancelled'. I've restarted it... |
Passing. I think this should be rebased and merged, just in case this is restored or fixed and someone wants to revert just the second commit some day. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. Let's do it. So we're saying here that you need https://github.com/ilammy/msvc-dev-cmd to build 2.7 on Windows?
You need to "override" the default compiler in order to build for 2.7 on Windows. If you override with the original 2.7 2008 compiler, you can still build 2008 extensions (of course, you need to find a copy somewhere). If you choose a newer one, you have to be a little careful in how you use Python (tools like pybind11 are), and you have to have the 2015 redistributable. Since the 2008 compiler is really, really old, I think pretty much the norm on Windows is to override and use the 2015 compiler, or just to not support 2.7 on Windows at all. Override == setting |
Gotcha. Just figuring out how we might document this. I'm thinking an FAQ entry like this. Any thoughts? Windows and Python 2.7Building 2.7 extensions on Windows is difficult, because the VS2008 compiler that was used for the original Python compilation is difficult to find these days. Most people choose to not build Windows 2.7 wheels, or to override the compiler to something more modern. To override, you need to have a modern compiler toolchain activated, and set - name: Prepare compiler environment for Windows
if: runner.os == 'Windows'
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Set Windows environment variables
if: runner.os == 'Windows'
shell: bash
run: |
echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
echo "MSSdk=1" >> $GITHUB_ENV Note that changing to a more modern compiler will mean your wheel picks up a runtime dependency to a different Visual C++ Redistributable. |
Building 2.7 extensions on Windows is difficult, because the VS 2008 compiler that was used for the original Python compilation was discontinued in 2018, and has since been removed from Microsoft's downloads. Most people choose to not build Windows 2.7 wheels, or to override the compiler to something more modern. ... cibuildwheel will not try to build 2.7 on Windows unless it detects that the above two variables are set. Note that changing to a more modern compiler will mean your wheel picks up a runtime dependency to a different Visual C++ Redistributable. You also need to be a bit careful in designing your extension; some major binding tools like pybind11 do this for you. |
🙌 perfect |
Didn't we already have a link to that, somewhere? Probably in the "Python 2.7 on Windows" section. |
You are right - https://cibuildwheel.readthedocs.io/en/stable/cpp_standards/#windows-and-python-27 The section in cpp-standards goes into a bit more depth, I'll link there from the FAQ. |
Can't have too many links from different places for this, indeed. Apparently it's hidden enough for the maintainers themselves to miss it ;-) |
Hoping to fix the issues seen in current CI runs. At the very least, we will follow the style guide linked below.
Following https://docs.chocolatey.org/en-us/choco/commands/#scripting-integration-best-practices-style-guide
-f
in scripts-y
in scriptsupgrade
instead ofinstall
in scripts--limit-output
for more parsable output (should turn off progress bar as well, hopefully)The issue with vcpython27 might be temporary, caused by the -f, or possibly permanent since it has been untouched since 2016.