-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7580 from nulano/cibuildwheel-docker
Build Windows wheels using cibuildwheel
- Loading branch information
Showing
10 changed files
with
196 additions
and
73 deletions.
There are no files selected for viewing
This file contains 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 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,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 } |
This file contains 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 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 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 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,41 @@ | ||
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 | ||
try: | ||
import tkinter | ||
|
||
assert tkinter | ||
except ImportError: | ||
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 |
This file contains 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 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 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 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