-
Notifications
You must be signed in to change notification settings - Fork 4k
ARROW-18054: [Python][CI] Enable Cython tests on windows wheels #13552
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
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
2bca6bd
Enable Cython tests on windows wheels
raulcd ba9046f
Add some temporary debugging
raulcd 97c4532
Change docker image to contain vs2017 to be able to run cython tests
raulcd 8e38b36
Update volume cache name
raulcd 81193ed
Add new dockerfile with vs2017 to be able to build cython on tests
raulcd 93efa30
Add unix tools to path to be able to use rm
raulcd 785078f
Add some debugging to understand where the failures are coming from
raulcd 469961c
Add os.add_dll_directory for cython test on acse of python > 3.8
raulcd 422831d
Fix non-windows tests
raulcd d5fe64c
Clean up some debugging
raulcd 0c05f7f
Fix not setting LD_LIBRARY_PATH on windows if os.add_dll_directory is…
raulcd 3ff78d0
Only update PATH/LD_LIBRARY_PATH if it is necessary
raulcd File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # NOTE: You must update PYTHON_WHEEL_WINDOWS_IMAGE_REVISION in .env | ||
| # when you update this file. | ||
|
|
||
| # based on mcr.microsoft.com/windows/servercore:ltsc2019 | ||
| # contains choco and vs2017 preinstalled | ||
| FROM abrarov/msvc-2017:2.11.0 | ||
|
|
||
| # Add unix tools to path | ||
| RUN setx path "%path%;C:\Program Files\Git\usr\bin" | ||
|
|
||
| # Remove previous installations of python from the base image | ||
| # NOTE: a more recent base image (tried with 2.12.1) comes with python 3.9.7 | ||
| # and the msi installers are failing to remove pip and tcl/tk "products" making | ||
| # the subsequent choco python installation step failing for installing python | ||
| # version 3.9.* due to existing python version | ||
| RUN wmic product where "name like 'python%%'" call uninstall /nointeractive && \ | ||
| rm -rf Python* | ||
|
|
||
| # Define the full version number otherwise choco falls back to patch number 0 (3.7 => 3.7.0) | ||
| ARG python=3.8 | ||
| RUN (if "%python%"=="3.7" setx PYTHON_VERSION "3.7.9" && setx PATH "%PATH%;C:\Python37;C:\Python37\Scripts") & \ | ||
| (if "%python%"=="3.8" setx PYTHON_VERSION "3.8.10" && setx PATH "%PATH%;C:\Python38;C:\Python38\Scripts") & \ | ||
| (if "%python%"=="3.9" setx PYTHON_VERSION "3.9.7" && setx PATH "%PATH%;C:\Python39;C:\Python39\Scripts") & \ | ||
| (if "%python%"=="3.10" setx PYTHON_VERSION "3.10.2" && setx PATH "%PATH%;C:\Python310;C:\Python310\Scripts") | ||
| RUN choco install -r -y --no-progress python --version=%PYTHON_VERSION% | ||
| RUN python -m pip install -U pip setuptools | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
For the record, are there other upstream images that we could use?
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.
We could create our own images with Visual C++ based from the official Microsoft ones
FROM mcr.microsoft.com/windows/servercore:ltsc2019example here: https://learn.microsoft.com/en-us/previous-versions/visualstudio/visual-studio-2017/install/build-tools-container?view=vs-2017 but I wanted to use the same one we have on the python-wheels for consistency: https://github.com/apache/arrow/blob/master/ci/docker/python-wheel-windows-vs2017.dockerfile#L23There was someone working on updating the Visual C++ version to 2019, maybe I could try to create new Dockerfile images removing the
abrarov/msvc-2017base image and create new ones based on the Microsoft onesmcr.microsoft.com/windows/servercore?I would prefer to do that as a different ticket if you are ok with that.
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.
That was me, but it was precisely stalled because of the "uninstall then install Python" problem.
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.
That's fine with me!