-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Build Windows wheels using cibuildwheel #7580
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
Changes from 7 commits
4f939a1
bf51d71
3d49244
1fdb066
7dc3a8f
d88ab8a
6fe42bd
e105976
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| param ([string]$venv, [string]$pillow="C:\pillow") | ||
| $ErrorActionPreference = 'Stop' | ||
| $ProgressPreference = 'SilentlyContinue' | ||
| Set-PSDebug -Trace 1 | ||
| if ("$venv" -like "*\cibw-run-*\pp*-win_amd64\*") { | ||
| # unlike CPython, PyPy requires Visual C++ Redistributable to be installed | ||
| [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 | ||
| Invoke-WebRequest -Uri 'https://aka.ms/vs/15/release/vc_redist.x64.exe' -OutFile 'vc_redist.x64.exe' | ||
| C:\vc_redist.x64.exe /install /quiet /norestart | Out-Null | ||
| } | ||
| $env:path += ";$pillow\winbuild\build\bin\" | ||
| & "$venv\Scripts\activate.ps1" | ||
| & reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\python.exe" /v "GlobalFlag" /t REG_SZ /d "0x02000000" /f | ||
| cd $pillow | ||
| & python -VV | ||
| if (!$?) { exit $LASTEXITCODE } | ||
| & python selftest.py | ||
| if (!$?) { exit $LASTEXITCODE } | ||
| & python -m pytest -vx Tests\check_wheel.py | ||
| if (!$?) { exit $LASTEXITCODE } | ||
| & python -m pytest -vx Tests | ||
| if (!$?) { exit $LASTEXITCODE } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| import importlib.util | ||
| import sys | ||
|
|
||
| from PIL import features | ||
|
|
||
|
|
||
| def test_wheel_modules(): | ||
| expected_modules = {"pil", "tkinter", "freetype2", "littlecms2", "webp"} | ||
|
|
||
| # tkinter is not available in cibuildwheel installed CPython on Windows | ||
| if not importlib.util.find_spec("tkinter"): | ||
|
||
| expected_modules.remove("tkinter") | ||
|
|
||
| assert set(features.get_supported_modules()) == expected_modules | ||
|
|
||
|
|
||
| def test_wheel_codecs(): | ||
| expected_codecs = {"jpg", "jpg_2000", "zlib", "libtiff"} | ||
|
|
||
| assert set(features.get_supported_codecs()) == expected_codecs | ||
|
|
||
|
|
||
| def test_wheel_features(): | ||
| expected_features = { | ||
| "webp_anim", | ||
| "webp_mux", | ||
| "transp_webp", | ||
| "raqm", | ||
| "fribidi", | ||
| "harfbuzz", | ||
| "libjpeg_turbo", | ||
| "xcb", | ||
| } | ||
|
|
||
| if sys.platform == "win32": | ||
| expected_features.remove("xcb") | ||
|
|
||
| assert set(features.get_supported_features()) == expected_features | ||
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.
Previously, this was only run for one Python version.
Pillow/.github/workflows/test-windows.yml
Lines 246 to 248 in 63bec07
Any particular reason it's now being run for every version?
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.
This is now in the
wheels.ymlworkflow which only runs a single job for all Python versions of a single architecture.Previously it was in
test-windows.ymlwhich has a separate job for each Python version.