mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Removed support for 32-bit
This commit is contained in:
		
							parent
							
								
									73fc73038a
								
							
						
					
					
						commit
						d6f19625e8
					
				| 
						 | 
					@ -10,8 +10,8 @@ environment:
 | 
				
			||||||
  TEST_OPTIONS:
 | 
					  TEST_OPTIONS:
 | 
				
			||||||
  DEPLOY: YES
 | 
					  DEPLOY: YES
 | 
				
			||||||
  matrix:
 | 
					  matrix:
 | 
				
			||||||
  - PYTHON: C:/Python311
 | 
					  - PYTHON: C:/Python311-x64
 | 
				
			||||||
    ARCHITECTURE: x86
 | 
					    ARCHITECTURE: x64
 | 
				
			||||||
    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: x64
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								.github/workflows/test-docker.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								.github/workflows/test-docker.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -38,8 +38,8 @@ jobs:
 | 
				
			||||||
          centos-7-amd64,
 | 
					          centos-7-amd64,
 | 
				
			||||||
          centos-stream-8-amd64,
 | 
					          centos-stream-8-amd64,
 | 
				
			||||||
          centos-stream-9-amd64,
 | 
					          centos-stream-9-amd64,
 | 
				
			||||||
          debian-11-bullseye-x86,
 | 
					          debian-11-bullseye-amd64,
 | 
				
			||||||
          debian-12-bookworm-x86,
 | 
					          debian-12-bookworm-amd64,
 | 
				
			||||||
          fedora-37-amd64,
 | 
					          fedora-37-amd64,
 | 
				
			||||||
          fedora-38-amd64,
 | 
					          fedora-38-amd64,
 | 
				
			||||||
          gentoo,
 | 
					          gentoo,
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										63
									
								
								.github/workflows/test-mingw.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										63
									
								
								.github/workflows/test-mingw.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -21,27 +21,16 @@ concurrency:
 | 
				
			||||||
jobs:
 | 
					jobs:
 | 
				
			||||||
  build:
 | 
					  build:
 | 
				
			||||||
    runs-on: windows-latest
 | 
					    runs-on: windows-latest
 | 
				
			||||||
    strategy:
 | 
					 | 
				
			||||||
      fail-fast: false
 | 
					 | 
				
			||||||
      matrix:
 | 
					 | 
				
			||||||
        mingw: ["MINGW32", "MINGW64"]
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          - mingw: "MINGW32"
 | 
					 | 
				
			||||||
            name: "MSYS2 MinGW 32-bit"
 | 
					 | 
				
			||||||
            package: "mingw-w64-i686"
 | 
					 | 
				
			||||||
          - mingw: "MINGW64"
 | 
					 | 
				
			||||||
            name: "MSYS2 MinGW 64-bit"
 | 
					 | 
				
			||||||
            package: "mingw-w64-x86_64"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    defaults:
 | 
					    defaults:
 | 
				
			||||||
      run:
 | 
					      run:
 | 
				
			||||||
        shell: bash.exe --login -eo pipefail "{0}"
 | 
					        shell: bash.exe --login -eo pipefail "{0}"
 | 
				
			||||||
    env:
 | 
					    env:
 | 
				
			||||||
      MSYSTEM: ${{ matrix.mingw }}
 | 
					      MSYSTEM: MINGW64
 | 
				
			||||||
      CHERE_INVOKING: 1
 | 
					      CHERE_INVOKING: 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    timeout-minutes: 30
 | 
					    timeout-minutes: 30
 | 
				
			||||||
    name: ${{ matrix.name }}
 | 
					    name: "MSYS2 MinGW"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
      - name: Checkout Pillow
 | 
					      - name: Checkout Pillow
 | 
				
			||||||
| 
						 | 
					@ -54,26 +43,22 @@ jobs:
 | 
				
			||||||
      - name: Install dependencies
 | 
					      - name: Install dependencies
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
          pacman -S --noconfirm \
 | 
					          pacman -S --noconfirm \
 | 
				
			||||||
              ${{ matrix.package }}-freetype \
 | 
					              mingw-w64-x86_64-freetype \
 | 
				
			||||||
              ${{ matrix.package }}-gcc \
 | 
					              mingw-w64-x86_64-gcc \
 | 
				
			||||||
              ${{ matrix.package }}-ghostscript \
 | 
					              mingw-w64-x86_64-ghostscript \
 | 
				
			||||||
              ${{ matrix.package }}-lcms2 \
 | 
					              mingw-w64-x86_64-lcms2 \
 | 
				
			||||||
              ${{ matrix.package }}-libimagequant \
 | 
					              mingw-w64-x86_64-libimagequant \
 | 
				
			||||||
              ${{ matrix.package }}-libjpeg-turbo \
 | 
					              mingw-w64-x86_64-libjpeg-turbo \
 | 
				
			||||||
              ${{ matrix.package }}-libraqm \
 | 
					              mingw-w64-x86_64-libraqm \
 | 
				
			||||||
              ${{ matrix.package }}-libtiff \
 | 
					              mingw-w64-x86_64-libtiff \
 | 
				
			||||||
              ${{ matrix.package }}-libwebp \
 | 
					              mingw-w64-x86_64-libwebp \
 | 
				
			||||||
              ${{ matrix.package }}-openjpeg2 \
 | 
					              mingw-w64-x86_64-openjpeg2 \
 | 
				
			||||||
              ${{ matrix.package }}-python3-cffi \
 | 
					              mingw-w64-x86_64-python3-cffi \
 | 
				
			||||||
              ${{ matrix.package }}-python3-numpy \
 | 
					              mingw-w64-x86_64-python3-numpy \
 | 
				
			||||||
              ${{ matrix.package }}-python3-olefile \
 | 
					              mingw-w64-x86_64-python3-olefile \
 | 
				
			||||||
              ${{ matrix.package }}-python3-pip \
 | 
					              mingw-w64-x86_64-python3-pip \
 | 
				
			||||||
              ${{ matrix.package }}-python3-setuptools
 | 
					              mingw-w64-x86_64-python3-setuptools \
 | 
				
			||||||
 | 
					              mingw-w64-x86_64-python-pyqt6
 | 
				
			||||||
          if [ ${{ matrix.package }} == "mingw-w64-x86_64" ]; then
 | 
					 | 
				
			||||||
              pacman -S --noconfirm \
 | 
					 | 
				
			||||||
                  ${{ matrix.package }}-python-pyqt6
 | 
					 | 
				
			||||||
          fi
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
          python3 -m pip install pyroma pytest pytest-cov pytest-timeout
 | 
					          python3 -m pip install pyroma pytest pytest-cov pytest-timeout
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -93,14 +78,4 @@ jobs:
 | 
				
			||||||
        with:
 | 
					        with:
 | 
				
			||||||
          file: ./coverage.xml
 | 
					          file: ./coverage.xml
 | 
				
			||||||
          flags: GHA_Windows
 | 
					          flags: GHA_Windows
 | 
				
			||||||
          name: ${{ matrix.name }}
 | 
					          name: "MSYS2 MinGW"
 | 
				
			||||||
 | 
					 | 
				
			||||||
  success:
 | 
					 | 
				
			||||||
    permissions:
 | 
					 | 
				
			||||||
      contents: none
 | 
					 | 
				
			||||||
    needs: build
 | 
					 | 
				
			||||||
    runs-on: ubuntu-latest
 | 
					 | 
				
			||||||
    name: MinGW Test Successful
 | 
					 | 
				
			||||||
    steps:
 | 
					 | 
				
			||||||
      - name: Success
 | 
					 | 
				
			||||||
        run: echo MinGW Test Successful
 | 
					 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										18
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										18
									
								
								.github/workflows/test-windows.yml
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -24,18 +24,11 @@ jobs:
 | 
				
			||||||
    strategy:
 | 
					    strategy:
 | 
				
			||||||
      fail-fast: false
 | 
					      fail-fast: false
 | 
				
			||||||
      matrix:
 | 
					      matrix:
 | 
				
			||||||
        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev"]
 | 
					        python-version: ["3.8", "3.9", "3.10", "3.11", "3.12-dev", "pypy3.9", "pypy3.10"]
 | 
				
			||||||
        architecture: ["x86", "x64"]
 | 
					 | 
				
			||||||
        include:
 | 
					 | 
				
			||||||
          # PyPy 7.3.4+ only ships 64-bit binaries for Windows
 | 
					 | 
				
			||||||
          - python-version: "pypy3.9"
 | 
					 | 
				
			||||||
            architecture: "x64"
 | 
					 | 
				
			||||||
          - python-version: "pypy3.10"
 | 
					 | 
				
			||||||
            architecture: "x64"
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    timeout-minutes: 30
 | 
					    timeout-minutes: 30
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    name: Python ${{ matrix.python-version }} ${{ matrix.architecture }}
 | 
					    name: Python ${{ matrix.python-version }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    steps:
 | 
					    steps:
 | 
				
			||||||
    - name: Checkout Pillow
 | 
					    - name: Checkout Pillow
 | 
				
			||||||
| 
						 | 
					@ -58,7 +51,6 @@ jobs:
 | 
				
			||||||
      uses: actions/setup-python@v4
 | 
					      uses: actions/setup-python@v4
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        python-version: ${{ matrix.python-version }}
 | 
					        python-version: ${{ matrix.python-version }}
 | 
				
			||||||
        architecture: ${{ matrix.architecture }}
 | 
					 | 
				
			||||||
        cache: pip
 | 
					        cache: pip
 | 
				
			||||||
        cache-dependency-path: ".github/workflows/test-windows.yml"
 | 
					        cache-dependency-path: ".github/workflows/test-windows.yml"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -206,14 +198,14 @@ jobs:
 | 
				
			||||||
      with:
 | 
					      with:
 | 
				
			||||||
        file: ./coverage.xml
 | 
					        file: ./coverage.xml
 | 
				
			||||||
        flags: GHA_Windows
 | 
					        flags: GHA_Windows
 | 
				
			||||||
        name: ${{ runner.os }} Python ${{ matrix.python-version }} ${{ matrix.architecture }}
 | 
					        name: ${{ runner.os }} Python ${{ matrix.python-version }}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    - name: Build wheel
 | 
					    - name: Build wheel
 | 
				
			||||||
      id: wheel
 | 
					      id: wheel
 | 
				
			||||||
      if: "github.event_name != 'pull_request'"
 | 
					      if: "github.event_name != 'pull_request'"
 | 
				
			||||||
      run: |
 | 
					      run: |
 | 
				
			||||||
        mkdir fribidi\${{ matrix.architecture }}
 | 
					        mkdir fribidi
 | 
				
			||||||
        copy winbuild\build\bin\fribidi* fribidi\${{ matrix.architecture }}
 | 
					        copy winbuild\build\bin\fribidi* fribidi
 | 
				
			||||||
        setlocal EnableDelayedExpansion
 | 
					        setlocal EnableDelayedExpansion
 | 
				
			||||||
        for %%f in (winbuild\build\license\*) do (
 | 
					        for %%f in (winbuild\build\license\*) do (
 | 
				
			||||||
          set x=%%~nf
 | 
					          set x=%%~nf
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,8 +0,0 @@
 | 
				
			||||||
#!/usr/bin/env python3
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
from PIL import Image
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if sys.maxsize < 2**32:
 | 
					 | 
				
			||||||
    im = Image.new("L", (999999, 999999), 0)
 | 
					 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,3 @@
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
| 
						 | 
					@ -23,9 +21,6 @@ YDIM = 32769
 | 
				
			||||||
XDIM = 48000
 | 
					XDIM = 48000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pytestmark = pytest.mark.skipif(sys.maxsize <= 2**32, reason="requires 64-bit system")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def _write_png(tmp_path, xdim, ydim):
 | 
					def _write_png(tmp_path, xdim, ydim):
 | 
				
			||||||
    f = str(tmp_path / "temp.png")
 | 
					    f = str(tmp_path / "temp.png")
 | 
				
			||||||
    im = Image.new("L", (xdim, ydim), 0)
 | 
					    im = Image.new("L", (xdim, ydim), 0)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,3 @@
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
| 
						 | 
					@ -19,9 +17,6 @@ YDIM = 32769
 | 
				
			||||||
XDIM = 48000
 | 
					XDIM = 48000
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
pytestmark = pytest.mark.skipif(sys.maxsize <= 2**32, reason="requires 64-bit system")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
def _write_png(tmp_path, xdim, ydim):
 | 
					def _write_png(tmp_path, xdim, ydim):
 | 
				
			||||||
    dtype = np.uint8
 | 
					    dtype = np.uint8
 | 
				
			||||||
    a = np.zeros((xdim, ydim), dtype=dtype)
 | 
					    a = np.zeros((xdim, ydim), dtype=dtype)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,3 @@
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
| 
						 | 
					@ -110,9 +108,6 @@ class TestCoreMemory:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        with pytest.raises(ValueError):
 | 
					        with pytest.raises(ValueError):
 | 
				
			||||||
            Image.core.set_blocks_max(-1)
 | 
					            Image.core.set_blocks_max(-1)
 | 
				
			||||||
        if sys.maxsize < 2**32:
 | 
					 | 
				
			||||||
            with pytest.raises(ValueError):
 | 
					 | 
				
			||||||
                Image.core.set_blocks_max(2**29)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.skipif(is_pypy(), reason="Images not collected")
 | 
					    @pytest.mark.skipif(is_pypy(), reason="Images not collected")
 | 
				
			||||||
    def test_set_blocks_max_stats(self):
 | 
					    def test_set_blocks_max_stats(self):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,6 +1,5 @@
 | 
				
			||||||
import io
 | 
					import io
 | 
				
			||||||
import re
 | 
					import re
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
import warnings
 | 
					import warnings
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
| 
						 | 
					@ -145,7 +144,6 @@ class TestFileWebp:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self._roundtrip(tmp_path, "P", 50.0)
 | 
					        self._roundtrip(tmp_path, "P", 50.0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @pytest.mark.skipif(sys.maxsize <= 2**32, reason="Requires 64-bit system")
 | 
					 | 
				
			||||||
    def test_write_encoding_error_message(self, tmp_path):
 | 
					    def test_write_encoding_error_message(self, tmp_path):
 | 
				
			||||||
        temp_file = str(tmp_path / "temp.webp")
 | 
					        temp_file = str(tmp_path / "temp.webp")
 | 
				
			||||||
        im = Image.new("RGB", (15000, 15000))
 | 
					        im = Image.new("RGB", (15000, 15000))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -38,10 +38,7 @@ def test_long_integers():
 | 
				
			||||||
    assert put(0xFFFFFFFF) == (255, 255, 255, 255)
 | 
					    assert put(0xFFFFFFFF) == (255, 255, 255, 255)
 | 
				
			||||||
    assert put(-1) == (255, 255, 255, 255)
 | 
					    assert put(-1) == (255, 255, 255, 255)
 | 
				
			||||||
    assert put(-1) == (255, 255, 255, 255)
 | 
					    assert put(-1) == (255, 255, 255, 255)
 | 
				
			||||||
    if sys.maxsize > 2**32:
 | 
					 | 
				
			||||||
    assert put(sys.maxsize) == (255, 255, 255, 255)
 | 
					    assert put(sys.maxsize) == (255, 255, 255, 255)
 | 
				
			||||||
    else:
 | 
					 | 
				
			||||||
        assert put(sys.maxsize) == (255, 255, 255, 127)
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_pypy_performance():
 | 
					def test_pypy_performance():
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,5 +1,3 @@
 | 
				
			||||||
import sys
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import pytest
 | 
					import pytest
 | 
				
			||||||
 | 
					
 | 
				
			||||||
from PIL import Image
 | 
					from PIL import Image
 | 
				
			||||||
| 
						 | 
					@ -36,7 +34,6 @@ def test_tobytes():
 | 
				
			||||||
    Image.MAX_IMAGE_PIXELS = max_pixels
 | 
					    Image.MAX_IMAGE_PIXELS = max_pixels
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@pytest.mark.skipif(sys.maxsize <= 2**32, reason="Requires 64-bit system")
 | 
					 | 
				
			||||||
def test_ysize():
 | 
					def test_ysize():
 | 
				
			||||||
    numpy = pytest.importorskip("numpy", reason="NumPy not installed")
 | 
					    numpy = pytest.importorskip("numpy", reason="NumPy not installed")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -285,11 +285,8 @@ Many of Pillow's features require external libraries:
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. tab:: Windows using MSYS2/MinGW
 | 
					.. tab:: Windows using MSYS2/MinGW
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    To build Pillow using MSYS2, make sure you run the **MSYS2 MinGW 32-bit** or
 | 
					    To build Pillow using MSYS2, make sure you run the **MSYS2 MinGW 64-bit** console,
 | 
				
			||||||
    **MSYS2 MinGW 64-bit** console, *not* **MSYS2** directly.
 | 
					    *not* **MSYS2** directly.
 | 
				
			||||||
 | 
					 | 
				
			||||||
    The following instructions target the 64-bit build, for 32-bit
 | 
					 | 
				
			||||||
    replace all occurrences of ``mingw-w64-x86_64-`` with ``mingw-w64-i686-``.
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    Make sure you have Python and GCC installed::
 | 
					    Make sure you have Python and GCC installed::
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -339,8 +336,6 @@ Many of Pillow's features require external libraries:
 | 
				
			||||||
        pkg install -y python ndk-sysroot clang make \
 | 
					        pkg install -y python ndk-sysroot clang make \
 | 
				
			||||||
            libjpeg-turbo
 | 
					            libjpeg-turbo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    This has been tested within the Termux app on ChromeOS, on x86.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Installing
 | 
					Installing
 | 
				
			||||||
^^^^^^^^^^
 | 
					^^^^^^^^^^
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -451,9 +446,9 @@ These platforms are built and tested for every change.
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| CentOS Stream 9                  | 3.9                        | x86-64              |
 | 
					| CentOS Stream 9                  | 3.9                        | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| Debian 11 Bullseye               | 3.9                        | x86                 |
 | 
					| Debian 11 Bullseye               | 3.9                        | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| Debian 12 Bookworm               | 3.11                       | x86                 |
 | 
					| Debian 12 Bookworm               | 3.11                       | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| Fedora 37                        | 3.11                       | x86-64              |
 | 
					| Fedora 37                        | 3.11                       | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| 
						 | 
					@ -474,10 +469,10 @@ These platforms are built and tested for every change.
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| Windows Server 2016              | 3.8                        | x86-64              |
 | 
					| Windows Server 2016              | 3.8                        | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| Windows Server 2022              | 3.8, 3.9, 3.10, 3.11,      | x86, x86-64         |
 | 
					| Windows Server 2022              | 3.8, 3.9, 3.10, 3.11,      | x86-64              |
 | 
				
			||||||
|                                  | 3.12, PyPy3                |                     |
 | 
					|                                  | 3.12, PyPy3                |                     |
 | 
				
			||||||
|                                  +----------------------------+---------------------+
 | 
					|                                  +----------------------------+---------------------+
 | 
				
			||||||
|                                  | 3.9 (MinGW)                | x86, x86-64         |
 | 
					|                                  | 3.9 (MinGW)                | x86-64              |
 | 
				
			||||||
|                                  +----------------------------+---------------------+
 | 
					|                                  +----------------------------+---------------------+
 | 
				
			||||||
|                                  | 3.8, 3.9 (Cygwin)          | x86-64              |
 | 
					|                                  | 3.8, 3.9 (Cygwin)          | x86-64              |
 | 
				
			||||||
+----------------------------------+----------------------------+---------------------+
 | 
					+----------------------------------+----------------------------+---------------------+
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										20
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								setup.py
									
									
									
									
									
								
							| 
						 | 
					@ -153,16 +153,13 @@ def _find_library_dirs_ldconfig():
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    ldconfig = "ldconfig" if shutil.which("ldconfig") else "/sbin/ldconfig"
 | 
					    ldconfig = "ldconfig" if shutil.which("ldconfig") else "/sbin/ldconfig"
 | 
				
			||||||
    if sys.platform.startswith("linux") or sys.platform.startswith("gnu"):
 | 
					    if sys.platform.startswith("linux") or sys.platform.startswith("gnu"):
 | 
				
			||||||
        if struct.calcsize("l") == 4:
 | 
					        machine = os.uname()[4]
 | 
				
			||||||
            machine = os.uname()[4] + "-32"
 | 
					 | 
				
			||||||
        else:
 | 
					 | 
				
			||||||
            machine = os.uname()[4] + "-64"
 | 
					 | 
				
			||||||
        mach_map = {
 | 
					        mach_map = {
 | 
				
			||||||
            "x86_64-64": "libc6,x86-64",
 | 
					            "x86_64": "libc6,x86-64",
 | 
				
			||||||
            "ppc64-64": "libc6,64bit",
 | 
					            "ppc64": "libc6,64bit",
 | 
				
			||||||
            "sparc64-64": "libc6,64bit",
 | 
					            "sparc64": "libc6,64bit",
 | 
				
			||||||
            "s390x-64": "libc6,64bit",
 | 
					            "s390x": "libc6,64bit",
 | 
				
			||||||
            "ia64-64": "libc6,IA-64",
 | 
					            "ia64": "libc6,IA-64",
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        abi_type = mach_map.get(machine, "libc6")
 | 
					        abi_type = mach_map.get(machine, "libc6")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -584,10 +581,7 @@ class pil_build_ext(build_ext):
 | 
				
			||||||
                # user libs are at $PREFIX/lib
 | 
					                # user libs are at $PREFIX/lib
 | 
				
			||||||
                _add_directory(
 | 
					                _add_directory(
 | 
				
			||||||
                    library_dirs,
 | 
					                    library_dirs,
 | 
				
			||||||
                    os.path.join(
 | 
					                    os.path.join(os.environ["ANDROID_ROOT"], "lib64"),
 | 
				
			||||||
                        os.environ["ANDROID_ROOT"],
 | 
					 | 
				
			||||||
                        "lib" if struct.calcsize("l") == 4 else "lib64",
 | 
					 | 
				
			||||||
                    ),
 | 
					 | 
				
			||||||
                )
 | 
					                )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        elif sys.platform.startswith("netbsd"):
 | 
					        elif sys.platform.startswith("netbsd"):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -30,7 +30,7 @@
 | 
				
			||||||
/* This is to work around a bug in GCC prior 4.9 in 64 bit mode.
 | 
					/* This is to work around a bug in GCC prior 4.9 in 64 bit mode.
 | 
				
			||||||
   GCC generates code with partial dependency which is 3 times slower.
 | 
					   GCC generates code with partial dependency which is 3 times slower.
 | 
				
			||||||
   See: https://stackoverflow.com/a/26588074/253146 */
 | 
					   See: https://stackoverflow.com/a/26588074/253146 */
 | 
				
			||||||
#if defined(__x86_64__) && defined(__SSE__) && !defined(__NO_INLINE__) && \
 | 
					#if defined(__SSE__) && !defined(__NO_INLINE__) && \
 | 
				
			||||||
    !defined(__clang__) && defined(GCC_VERSION) && (GCC_VERSION < 40900)
 | 
					    !defined(__clang__) && defined(GCC_VERSION) && (GCC_VERSION < 40900)
 | 
				
			||||||
static float __attribute__((always_inline)) inline _i2f(int v) {
 | 
					static float __attribute__((always_inline)) inline _i2f(int v) {
 | 
				
			||||||
    float x;
 | 
					    float x;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -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>`_
 | 
					* x64: `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}]
 | 
					                                     [--architecture {x64,ARM64}]
 | 
				
			||||||
                                     [--python PYTHON] [--executable EXECUTABLE]
 | 
					                                     [--python PYTHON] [--executable EXECUTABLE]
 | 
				
			||||||
                                     [--nmake] [--no-imagequant] [--no-fribidi]
 | 
					                                     [--nmake] [--no-imagequant] [--no-fribidi]
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -56,7 +56,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 {x64,ARM64}
 | 
				
			||||||
                            build architecture (default: same as host Python)
 | 
					                            build architecture (default: same as host Python)
 | 
				
			||||||
      --python PYTHON       Python install directory (default: use host Python)
 | 
					      --python PYTHON       Python install directory (default: use host Python)
 | 
				
			||||||
      --executable EXECUTABLE
 | 
					      --executable EXECUTABLE
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,7 +3,6 @@ import os
 | 
				
			||||||
import platform
 | 
					import platform
 | 
				
			||||||
import re
 | 
					import re
 | 
				
			||||||
import shutil
 | 
					import shutil
 | 
				
			||||||
import struct
 | 
					 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
import sys
 | 
					import sys
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -98,7 +97,6 @@ def cmd_msbuild(
 | 
				
			||||||
SF_PROJECTS = "https://sourceforge.net/projects"
 | 
					SF_PROJECTS = "https://sourceforge.net/projects"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
architectures = {
 | 
					architectures = {
 | 
				
			||||||
    "x86": {"vcvars_arch": "x86", "msbuild_arch": "Win32"},
 | 
					 | 
				
			||||||
    "x64": {"vcvars_arch": "x86_amd64", "msbuild_arch": "x64"},
 | 
					    "x64": {"vcvars_arch": "x86_amd64", "msbuild_arch": "x64"},
 | 
				
			||||||
    "ARM64": {"vcvars_arch": "x86_arm64", "msbuild_arch": "ARM64"},
 | 
					    "ARM64": {"vcvars_arch": "x86_arm64", "msbuild_arch": "ARM64"},
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -611,11 +609,7 @@ if __name__ == "__main__":
 | 
				
			||||||
        choices=architectures,
 | 
					        choices=architectures,
 | 
				
			||||||
        default=os.environ.get(
 | 
					        default=os.environ.get(
 | 
				
			||||||
            "ARCHITECTURE",
 | 
					            "ARCHITECTURE",
 | 
				
			||||||
            (
 | 
					            "ARM64" if platform.machine() == "ARM64" else "x64",
 | 
				
			||||||
                "ARM64"
 | 
					 | 
				
			||||||
                if platform.machine() == "ARM64"
 | 
					 | 
				
			||||||
                else ("x86" if struct.calcsize("P") == 4 else "x64")
 | 
					 | 
				
			||||||
            ),
 | 
					 | 
				
			||||||
        ),
 | 
					        ),
 | 
				
			||||||
        help="build architecture (default: same as host Python)",
 | 
					        help="build architecture (default: same as host Python)",
 | 
				
			||||||
    )
 | 
					    )
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user