mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-14 11:26:27 +03:00
Merge pull request #7693 from nulano/winbuild-amd64
Rename x64 to AMD64 in winbuild
This commit is contained in:
commit
f98fc9b8a3
|
@ -14,7 +14,7 @@ environment:
|
||||||
ARCHITECTURE: x86
|
ARCHITECTURE: x86
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2022
|
||||||
- PYTHON: C:/Python38-x64
|
- PYTHON: C:/Python38-x64
|
||||||
ARCHITECTURE: x64
|
ARCHITECTURE: AMD64
|
||||||
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
|
||||||
|
|
||||||
|
|
||||||
|
|
17
.github/workflows/wheels.yml
vendored
17
.github/workflows/wheels.yml
vendored
|
@ -141,18 +141,15 @@ jobs:
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
windows:
|
windows:
|
||||||
name: Windows ${{ matrix.arch }}
|
name: Windows ${{ matrix.cibw_arch }}
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- arch: x86
|
- cibw_arch: x86
|
||||||
cibw_arch: x86
|
- cibw_arch: AMD64
|
||||||
- arch: x64
|
- cibw_arch: ARM64
|
||||||
cibw_arch: AMD64
|
|
||||||
- arch: ARM64
|
|
||||||
cibw_arch: ARM64
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
@ -178,7 +175,7 @@ jobs:
|
||||||
# Install extra test images
|
# Install extra test images
|
||||||
xcopy /S /Y Tests\test-images\* Tests\images
|
xcopy /S /Y Tests\test-images\* Tests\images
|
||||||
|
|
||||||
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.arch }}
|
& python.exe winbuild\build_prepare.py -v --no-imagequant --architecture=${{ matrix.cibw_arch }}
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|
||||||
- name: Build wheels
|
- name: Build wheels
|
||||||
|
@ -219,13 +216,13 @@ jobs:
|
||||||
- name: Upload wheels
|
- name: Upload wheels
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dist-windows-${{ matrix.arch }}
|
name: dist-windows-${{ matrix.cibw_arch }}
|
||||||
path: ./wheelhouse/*.whl
|
path: ./wheelhouse/*.whl
|
||||||
|
|
||||||
- name: Upload fribidi.dll
|
- name: Upload fribidi.dll
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: fribidi-windows-${{ matrix.arch }}
|
name: fribidi-windows-${{ matrix.cibw_arch }}
|
||||||
path: winbuild\build\bin\fribidi*
|
path: winbuild\build\bin\fribidi*
|
||||||
|
|
||||||
sdist:
|
sdist:
|
||||||
|
|
|
@ -27,7 +27,7 @@ Download and install:
|
||||||
* `Ninja <https://ninja-build.org/>`_
|
* `Ninja <https://ninja-build.org/>`_
|
||||||
(optional, use ``--nmake`` if not available; bundled in Visual Studio CMake component)
|
(optional, use ``--nmake`` if not available; bundled in Visual Studio CMake component)
|
||||||
|
|
||||||
* x86/x64: `Netwide Assembler (NASM) <https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D>`_
|
* x86/AMD64: `Netwide Assembler (NASM) <https://www.nasm.us/pub/nasm/releasebuilds/?C=M;O=D>`_
|
||||||
|
|
||||||
Any version of Visual Studio 2017 or newer should be supported,
|
Any version of Visual Studio 2017 or newer should be supported,
|
||||||
including Visual Studio 2017 Community, or Build Tools for Visual Studio 2019.
|
including Visual Studio 2017 Community, or Build Tools for Visual Studio 2019.
|
||||||
|
@ -42,7 +42,7 @@ Run ``build_prepare.py`` to configure the build::
|
||||||
|
|
||||||
usage: winbuild\build_prepare.py [-h] [-v] [-d PILLOW_BUILD]
|
usage: winbuild\build_prepare.py [-h] [-v] [-d PILLOW_BUILD]
|
||||||
[--depends PILLOW_DEPS]
|
[--depends PILLOW_DEPS]
|
||||||
[--architecture {x86,x64,ARM64}] [--nmake]
|
[--architecture {x86,AMD64,ARM64}] [--nmake]
|
||||||
[--no-imagequant] [--no-fribidi]
|
[--no-imagequant] [--no-fribidi]
|
||||||
|
|
||||||
Download and generate build scripts for Pillow dependencies.
|
Download and generate build scripts for Pillow dependencies.
|
||||||
|
@ -55,7 +55,7 @@ Run ``build_prepare.py`` to configure the build::
|
||||||
--depends PILLOW_DEPS
|
--depends PILLOW_DEPS
|
||||||
directory used to store cached dependencies (default:
|
directory used to store cached dependencies (default:
|
||||||
'winbuild\depends')
|
'winbuild\depends')
|
||||||
--architecture {x86,x64,ARM64}
|
--architecture {x86,AMD64,ARM64}
|
||||||
build architecture (default: same as host Python)
|
build architecture (default: same as host Python)
|
||||||
--nmake build dependencies using NMake instead of Ninja
|
--nmake build dependencies using NMake instead of Ninja
|
||||||
--no-imagequant skip GPL-licensed optional dependency libimagequant
|
--no-imagequant skip GPL-licensed optional dependency libimagequant
|
||||||
|
|
|
@ -105,7 +105,7 @@ SF_PROJECTS = "https://sourceforge.net/projects"
|
||||||
|
|
||||||
ARCHITECTURES = {
|
ARCHITECTURES = {
|
||||||
"x86": {"vcvars_arch": "x86", "msbuild_arch": "Win32"},
|
"x86": {"vcvars_arch": "x86", "msbuild_arch": "Win32"},
|
||||||
"x64": {"vcvars_arch": "x86_amd64", "msbuild_arch": "x64"},
|
"AMD64": {"vcvars_arch": "x86_amd64", "msbuild_arch": "x64"},
|
||||||
"ARM64": {"vcvars_arch": "x86_arm64", "msbuild_arch": "ARM64"},
|
"ARM64": {"vcvars_arch": "x86_arm64", "msbuild_arch": "ARM64"},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -174,23 +174,22 @@ DEPS = {
|
||||||
"filename": "libwebp-1.3.2.tar.gz",
|
"filename": "libwebp-1.3.2.tar.gz",
|
||||||
"dir": "libwebp-1.3.2",
|
"dir": "libwebp-1.3.2",
|
||||||
"license": "COPYING",
|
"license": "COPYING",
|
||||||
|
"patch": {
|
||||||
|
r"src\enc\picture_csp_enc.c": {
|
||||||
|
# link against libsharpyuv.lib
|
||||||
|
'#include "sharpyuv/sharpyuv.h"': '#include "sharpyuv/sharpyuv.h"\n#pragma comment(lib, "libsharpyuv.lib")', # noqa: E501
|
||||||
|
}
|
||||||
|
},
|
||||||
"build": [
|
"build": [
|
||||||
cmd_rmdir(r"output\release-static"), # clean
|
*cmds_cmake(
|
||||||
cmd_nmake(
|
"webp webpdemux webpmux",
|
||||||
"Makefile.vc",
|
"-DBUILD_SHARED_LIBS:BOOL=OFF",
|
||||||
"all",
|
"-DWEBP_LINK_STATIC:BOOL=OFF",
|
||||||
[
|
|
||||||
"CFG=release-static",
|
|
||||||
"RTLIBCFG=dynamic",
|
|
||||||
"OBJDIR=output",
|
|
||||||
"ARCH={architecture}",
|
|
||||||
"LIBWEBP_BASENAME=webp",
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
cmd_mkdir(r"{inc_dir}\webp"),
|
cmd_mkdir(r"{inc_dir}\webp"),
|
||||||
cmd_copy(r"src\webp\*.h", r"{inc_dir}\webp"),
|
cmd_copy(r"src\webp\*.h", r"{inc_dir}\webp"),
|
||||||
],
|
],
|
||||||
"libs": [r"output\release-static\{architecture}\lib\*.lib"],
|
"libs": [r"libsharpyuv.lib", r"libwebp*.lib"],
|
||||||
},
|
},
|
||||||
"libtiff": {
|
"libtiff": {
|
||||||
"url": "https://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz",
|
"url": "https://download.osgeo.org/libtiff/tiff-4.6.0.tar.gz",
|
||||||
|
@ -203,8 +202,8 @@ DEPS = {
|
||||||
"#ifdef LZMA_SUPPORT": '#ifdef LZMA_SUPPORT\n#pragma comment(lib, "liblzma.lib")', # noqa: E501
|
"#ifdef LZMA_SUPPORT": '#ifdef LZMA_SUPPORT\n#pragma comment(lib, "liblzma.lib")', # noqa: E501
|
||||||
},
|
},
|
||||||
r"libtiff\tif_webp.c": {
|
r"libtiff\tif_webp.c": {
|
||||||
# link against webp.lib
|
# link against libwebp.lib
|
||||||
"#ifdef WEBP_SUPPORT": '#ifdef WEBP_SUPPORT\n#pragma comment(lib, "webp.lib")', # noqa: E501
|
"#ifdef WEBP_SUPPORT": '#ifdef WEBP_SUPPORT\n#pragma comment(lib, "libwebp.lib")', # noqa: E501
|
||||||
},
|
},
|
||||||
r"test\CMakeLists.txt": {
|
r"test\CMakeLists.txt": {
|
||||||
"add_executable(test_write_read_tags ../placeholder.h)": "",
|
"add_executable(test_write_read_tags ../placeholder.h)": "",
|
||||||
|
@ -217,6 +216,7 @@ DEPS = {
|
||||||
*cmds_cmake(
|
*cmds_cmake(
|
||||||
"tiff",
|
"tiff",
|
||||||
"-DBUILD_SHARED_LIBS:BOOL=OFF",
|
"-DBUILD_SHARED_LIBS:BOOL=OFF",
|
||||||
|
"-DWebP_LIBRARY=libwebp",
|
||||||
'-DCMAKE_C_FLAGS="-nologo -DLZMA_API_STATIC"',
|
'-DCMAKE_C_FLAGS="-nologo -DLZMA_API_STATIC"',
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -651,7 +651,7 @@ if __name__ == "__main__":
|
||||||
(
|
(
|
||||||
"ARM64"
|
"ARM64"
|
||||||
if platform.machine() == "ARM64"
|
if platform.machine() == "ARM64"
|
||||||
else ("x86" if struct.calcsize("P") == 4 else "x64")
|
else ("x86" if struct.calcsize("P") == 4 else "AMD64")
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
help="build architecture (default: same as host Python)",
|
help="build architecture (default: same as host Python)",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user