From c7a30705eb3645680b3ea206bbedc968375fb385 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+starbuck5@users.noreply.github.com> Date: Fri, 6 Jun 2025 23:53:43 -0700 Subject: [PATCH 1/9] 2.5.5 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index be0b18dfa0..7a068baeb2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "pygame-ce" -version = "2.5.5.dev1" +version = "2.5.5" description = "Python Game Development" readme = "README.rst" # for long description requires-python = ">=3.9" From b9c97a0540eae6eb38439c54a0ce9752652eb4b3 Mon Sep 17 00:00:00 2001 From: Andrew Coffey <49015102+oddbookworm@users.noreply.github.com> Date: 2025年7月14日 01:29:09 -0500 Subject: [PATCH 2/9] Add pypy 3.11 support (#3527) * Add pypy 3.11 support * Upgrade cython version * Allow for numpy prerelease for pypy 3.11 * Numpy DOES have a full pypy 3.11 release... * drop pypy 3.9 Co-authored-by: Ankith * Skip numpy on manylinux x86_64 pypy 3.11 --------- Co-authored-by: Ankith --- pyproject.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7a068baeb2..84eca571dc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ requires = [ "meson-python<=0.17.1", "meson<=1.7.0", "ninja<=1.12.1", - "cython<=3.0.11", + "cython<=3.1.2", "sphinx<=8.1.3", "sphinx-autoapi<=3.3.2", "pyproject-metadata!=0.9.1", @@ -75,7 +75,7 @@ install = ['--tags=runtime,python-runtime,pg-tag'] # dependencies. Here is where uv comes into the picture. It is an "installer" like pip, # but faster. It has been observed to save a couple of minutes of CI time. build-frontend = "build[uv]" -build = "cp3{9,10,11,12,13}-* pp3{9,10}-*" +build = "cp3{9,10,11,12,13}-* pp3{10,11}-*" skip = "*-musllinux_*" # build[uv] is verbose by default, so below flag is not needed here # build-verbosity = 3 @@ -118,5 +118,5 @@ only-binary = ["numpy"] # 1. skip all 32-bit manylinux (i686) # 2. skip all pypy+arm combinations [[tool.cibuildwheel.overrides]] -select = "{*-manylinux_i686,pp*-*{arm64,aarch64}}" +select = "{*-manylinux_i686,pp*-*{arm64,aarch64},pp311-manylinux_x86_64}" test-requires = [] From 8760aa72b8fe31c77b1c19854e06ad49b23d2176 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+starbuck5@users.noreply.github.com> Date: 2025年7月17日 00:20:29 -0700 Subject: [PATCH 3/9] Special-case allow builds on PRs to this branch --- .github/workflows/build-debian-multiarch.yml | 4 +++- .github/workflows/build-emsdk.yml | 4 +++- .github/workflows/build-macos.yml | 4 +++- .github/workflows/build-manylinux.yml | 4 +++- .github/workflows/build-on-msys2.yml | 4 +++- .github/workflows/build-sdl3.yml | 4 +++- .github/workflows/build-ubuntu-coverage.yml | 4 +++- .github/workflows/build-ubuntu-debug-python.yml | 4 +++- .github/workflows/build-ubuntu-sdist.yml | 4 +++- .github/workflows/build-windows.yml | 4 +++- .github/workflows/cppcheck.yml | 4 +++- .github/workflows/dev-check.yml | 4 +++- 12 files changed, 36 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build-debian-multiarch.yml b/.github/workflows/build-debian-multiarch.yml index 927b5f841b..44d0b4bc84 100644 --- a/.github/workflows/build-debian-multiarch.yml +++ b/.github/workflows/build-debian-multiarch.yml @@ -20,7 +20,9 @@ on: - '!.github/workflows/build-debian-multiarch.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-emsdk.yml b/.github/workflows/build-emsdk.yml index d61e0c5420..7e1413d7a8 100644 --- a/.github/workflows/build-emsdk.yml +++ b/.github/workflows/build-emsdk.yml @@ -16,7 +16,9 @@ on: - '!.github/workflows/build-emsdk.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 7f4a007931..60f77e6abb 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -7,7 +7,9 @@ on: branches: main pull_request: - branches: main + branches: + - main + - 2.5.5-branch # the github release drafter can call this workflow workflow_call: diff --git a/.github/workflows/build-manylinux.yml b/.github/workflows/build-manylinux.yml index bf05a982de..fea79ee004 100644 --- a/.github/workflows/build-manylinux.yml +++ b/.github/workflows/build-manylinux.yml @@ -7,7 +7,9 @@ on: branches: main pull_request: - branches: main + branches: + - main + - 2.5.5-branch # the github release drafter can call this workflow workflow_call: diff --git a/.github/workflows/build-on-msys2.yml b/.github/workflows/build-on-msys2.yml index 0845aefce2..c8dbaa96a2 100644 --- a/.github/workflows/build-on-msys2.yml +++ b/.github/workflows/build-on-msys2.yml @@ -17,7 +17,9 @@ on: - '!.github/workflows/build-on-msys2.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-sdl3.yml b/.github/workflows/build-sdl3.yml index ba21795d45..7a0eace8e1 100644 --- a/.github/workflows/build-sdl3.yml +++ b/.github/workflows/build-sdl3.yml @@ -18,7 +18,9 @@ on: - '!.github/workflows/build-sdl3.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-ubuntu-coverage.yml b/.github/workflows/build-ubuntu-coverage.yml index 680481ba82..3f4a64b2d2 100644 --- a/.github/workflows/build-ubuntu-coverage.yml +++ b/.github/workflows/build-ubuntu-coverage.yml @@ -25,7 +25,9 @@ on: - '!.github/workflows/build-ubuntu-coverage.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-ubuntu-debug-python.yml b/.github/workflows/build-ubuntu-debug-python.yml index b1c24766e5..ee38c5d865 100644 --- a/.github/workflows/build-ubuntu-debug-python.yml +++ b/.github/workflows/build-ubuntu-debug-python.yml @@ -26,7 +26,9 @@ on: - '!.github/workflows/build-ubuntu-debug-python.yml' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths-ignore: - 'docs/**' - 'examples/**' diff --git a/.github/workflows/build-ubuntu-sdist.yml b/.github/workflows/build-ubuntu-sdist.yml index d5123e7ede..b0ea499e1b 100644 --- a/.github/workflows/build-ubuntu-sdist.yml +++ b/.github/workflows/build-ubuntu-sdist.yml @@ -14,7 +14,9 @@ on: branches: main pull_request: - branches: main + branches: + - main + - 2.5.5-branch # the github release drafter can call this workflow workflow_call: diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index abdf3c099b..a794de62ff 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -7,7 +7,9 @@ on: branches: main pull_request: - branches: main + branches: + - main + - 2.5.5-branch # the github release drafter can call this workflow workflow_call: diff --git a/.github/workflows/cppcheck.yml b/.github/workflows/cppcheck.yml index 2594db25d7..c510133370 100644 --- a/.github/workflows/cppcheck.yml +++ b/.github/workflows/cppcheck.yml @@ -8,7 +8,9 @@ on: - 'src_c/**' pull_request: - branches: main + branches: + - main + - 2.5.5-branch paths: - 'src_c/**' diff --git a/.github/workflows/dev-check.yml b/.github/workflows/dev-check.yml index 83d546df84..cd9a750fab 100644 --- a/.github/workflows/dev-check.yml +++ b/.github/workflows/dev-check.yml @@ -8,7 +8,9 @@ on: branches: main pull_request: - branches: main + branches: + - main + - 2.5.5-branch concurrency: group: ${{ github.workflow }}-${{ github.ref }}-dev-check From 066d6a9c7d5a2cce4d451922e922c6a593b7ad5e Mon Sep 17 00:00:00 2001 From: Andrew Coffey <49015102+oddbookworm@users.noreply.github.com> Date: 2025年7月26日 07:38:47 -0500 Subject: [PATCH 4/9] Merge pull request #3538 from Starbuck5/fix-tests-for-314 Fix refcount tests for Python 3.14 --- test/freetype_test.py | 7 +++--- test/mask_test.py | 56 +++++++++++++++++++++---------------------- test/rwobject_test.py | 31 ++++++++++-------------- 3 files changed, 45 insertions(+), 49 deletions(-) diff --git a/test/freetype_test.py b/test/freetype_test.py index dcc85c9b1b..56044d9d4c 100644 --- a/test/freetype_test.py +++ b/test/freetype_test.py @@ -4,6 +4,7 @@ import os import pathlib import platform +import sys import unittest import weakref @@ -1611,16 +1612,16 @@ def ref_items(seq): else: array = arrinter.Array(rect.size, "u", 1) o = font.render_raw(text) - self.assertEqual(getrefcount(o), 2) + self.assertIn(getrefcount(o), (1, 2)) self.assertEqual(getrefcount(o[0]), 2) self.assertEqual(getrefcount(o[1]), 2) self.assertEqual(getrefcount(font.render_raw_to(array, text)), 1) o = font.get_metrics("AB") - self.assertEqual(getrefcount(o), 2) + self.assertIn(getrefcount(o), (1, 2)) for i in range(len(o)): self.assertEqual(getrefcount(o[i]), 2, "refcount fail for item %d" % i) o = font.get_sizes() - self.assertEqual(getrefcount(o), 2) + self.assertIn(getrefcount(o), (1, 2)) for i in range(len(o)): self.assertEqual(getrefcount(o[i]), 2, "refcount fail for item %d" % i) diff --git a/test/mask_test.py b/test/mask_test.py index 6644e76d4c..c3e5b6a230 100644 --- a/test/mask_test.py +++ b/test/mask_test.py @@ -2569,7 +2569,7 @@ def test_get_bounding_rects(self): @unittest.skipIf(IS_PYPY, "Segfaults on pypy") def test_to_surface(self): """Ensures empty and full masks can be drawn onto surfaces.""" - expected_ref_count = 3 + expected_ref_count = (2, 3) size = (33, 65) surface = pygame.Surface(size, SRCALPHA, 32) surface_color = pygame.Color("red") @@ -2583,13 +2583,13 @@ def test_to_surface(self): self.assertIs(to_surface, surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__create_surface(self): """Ensures empty and full masks can be drawn onto a created surface.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 size = (33, 65) @@ -2606,7 +2606,7 @@ def test_to_surface__create_surface(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2614,7 +2614,7 @@ def test_to_surface__create_surface(self): def test_to_surface__surface_param(self): """Ensures to_surface accepts a surface arg/kwarg.""" - expected_ref_count = 4 + expected_ref_count = (3, 4) expected_color = pygame.Color("white") surface_color = pygame.Color("red") size = (5, 3) @@ -2632,13 +2632,13 @@ def test_to_surface__surface_param(self): self.assertIs(to_surface, surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) assertSurfaceFilled(self, to_surface, expected_color) def test_to_surface__setsurface_param(self): """Ensures to_surface accepts a setsurface arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") @@ -2657,7 +2657,7 @@ def test_to_surface__setsurface_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2665,7 +2665,7 @@ def test_to_surface__setsurface_param(self): def test_to_surface__unsetsurface_param(self): """Ensures to_surface accepts a unsetsurface arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") @@ -2683,7 +2683,7 @@ def test_to_surface__unsetsurface_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2691,7 +2691,7 @@ def test_to_surface__unsetsurface_param(self): def test_to_surface__setcolor_param(self): """Ensures to_surface accepts a setcolor arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") @@ -2707,7 +2707,7 @@ def test_to_surface__setcolor_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2728,7 +2728,7 @@ def test_to_surface__setcolor_default(self): def test_to_surface__unsetcolor_param(self): """Ensures to_surface accepts an unsetcolor arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("red") @@ -2746,7 +2746,7 @@ def test_to_surface__unsetcolor_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2767,7 +2767,7 @@ def test_to_surface__unsetcolor_default(self): def test_to_surface__dest_param(self): """Ensures to_surface accepts a dest arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 default_surface_color = (0, 0, 0, 0) @@ -2791,7 +2791,7 @@ def test_to_surface__dest_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -2823,7 +2823,7 @@ def test_to_surface__dest_default(self): @unittest.expectedFailure def test_to_surface__area_param(self): """Ensures to_surface accepts an area arg/kwarg.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 default_surface_color = (0, 0, 0, 0) @@ -2846,7 +2846,7 @@ def test_to_surface__area_param(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), size) @@ -3317,7 +3317,7 @@ def test_to_surface__default_surface_with_param_combinations(self): This tests many parameter combinations with full and empty masks. """ - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 size = (5, 3) @@ -3384,7 +3384,7 @@ def test_to_surface__default_surface_with_param_combinations(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual( + self.assertIn( sys.getrefcount(to_surface), expected_ref_count ) self.assertTrue(to_surface.get_flags() & expected_flag) @@ -3401,7 +3401,7 @@ def test_to_surface__surface_with_param_combinations(self): This tests many parameter combinations with full and empty masks. """ - expected_ref_count = 4 + expected_ref_count = (3, 4) expected_flag = SRCALPHA expected_depth = 32 size = (5, 3) @@ -3471,7 +3471,7 @@ def test_to_surface__surface_with_param_combinations(self): self.assertIs(to_surface, surface) if not IS_PYPY: - self.assertEqual( + self.assertIn( sys.getrefcount(to_surface), expected_ref_count ) self.assertTrue(to_surface.get_flags() & expected_flag) @@ -5263,7 +5263,7 @@ def test_to_surface__area_off_mask_with_setsurface_unsetsurface(self): def test_to_surface__surface_with_zero_size(self): """Ensures zero sized surfaces are handled correctly.""" - expected_ref_count = 3 + expected_ref_count = (2, 3) size = (0, 0) surface = pygame.Surface(size) mask = pygame.mask.Mask((3, 4), fill=True) @@ -5272,12 +5272,12 @@ def test_to_surface__surface_with_zero_size(self): self.assertIs(to_surface, surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertEqual(to_surface.get_size(), size) def test_to_surface__setsurface_with_zero_size(self): """Ensures zero sized setsurfaces are handled correctly.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("white") # Default setcolor. @@ -5289,7 +5289,7 @@ def test_to_surface__setsurface_with_zero_size(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), mask_size) @@ -5297,7 +5297,7 @@ def test_to_surface__setsurface_with_zero_size(self): def test_to_surface__unsetsurface_with_zero_size(self): """Ensures zero sized unsetsurfaces are handled correctly.""" - expected_ref_count = 2 + expected_ref_count = (1, 2) expected_flag = SRCALPHA expected_depth = 32 expected_color = pygame.Color("black") # Default unsetcolor. @@ -5309,7 +5309,7 @@ def test_to_surface__unsetsurface_with_zero_size(self): self.assertIsInstance(to_surface, pygame.Surface) if not IS_PYPY: - self.assertEqual(sys.getrefcount(to_surface), expected_ref_count) + self.assertIn(sys.getrefcount(to_surface), expected_ref_count) self.assertTrue(to_surface.get_flags() & expected_flag) self.assertEqual(to_surface.get_bitsize(), expected_depth) self.assertEqual(to_surface.get_size(), mask_size) diff --git a/test/rwobject_test.py b/test/rwobject_test.py index e12cb2b2f2..a827724bf5 100644 --- a/test/rwobject_test.py +++ b/test/rwobject_test.py @@ -1,12 +1,14 @@ import pathlib +import platform +import sys import unittest from pygame import encode_file_path, encode_string +IS_PYPY = "PyPy" == platform.python_implementation() -class RWopsEncodeStringTest(unittest.TestCase): - global getrefcount +class RWopsEncodeStringTest(unittest.TestCase): def test_obj_None(self): encoded_string = encode_string(None) @@ -68,22 +70,15 @@ def test_string_with_null_bytes(self): self.assertIs(encoded_string, b) self.assertEqual(encoded_decode_string, b) - try: - from sys import getrefcount as _g - - getrefcount = _g # This nonsense is for Python 3.x - except ImportError: - pass - else: - - def test_refcount(self): - bpath = b" This is a string that is not cached."[1:] - upath = bpath.decode("ascii") - before = getrefcount(bpath) - bpath = encode_string(bpath) - self.assertEqual(getrefcount(bpath), before) - bpath = encode_string(upath) - self.assertEqual(getrefcount(bpath), before) + @unittest.skipIf(IS_PYPY, "getrefcount not available on pypy") + def test_refcount(self): + bpath = b" This is a string that is not cached."[1:] + upath = bpath.decode("ascii") + before = sys.getrefcount(bpath) + bpath = encode_string(bpath) + self.assertEqual(sys.getrefcount(bpath), before) + bpath = encode_string(upath) + self.assertIn(sys.getrefcount(bpath), (before, before - 1)) def test_smp(self): utf_8 = b"a\xf0\x93\x82\xa7b" From 713c5af38163f97e33bbd1ee3b4e3214f5cf334a Mon Sep 17 00:00:00 2001 From: Charlie Hayden <46412508+starbuck5@users.noreply.github.com> Date: 2025年7月27日 12:29:17 -0700 Subject: [PATCH 5/9] Bump pypa/cibuildwheel from 3.0.1 to 3.1.1 and do the other things --- .github/workflows/build-macos.yml | 2 +- .github/workflows/build-manylinux.yml | 2 +- .github/workflows/build-windows.yml | 2 +- .../manylinux-build/docker_base/Dockerfile-aarch64 | 2 +- buildconfig/manylinux-build/docker_base/Dockerfile-i686 | 2 +- .../manylinux-build/docker_base/Dockerfile-x86_64 | 2 +- .../docker_base/libsamplerate/build-libsamplerate.sh | 6 ++++-- buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh | 5 +++-- buildconfig/manylinux-build/docker_base/ogg/ogg.sha512 | 2 +- pyproject.toml | 9 ++++++--- setup.py | 1 + 11 files changed, 21 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 60f77e6abb..389cafa005 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -120,7 +120,7 @@ jobs: version: "0.5.26" - name: Build and test wheels - uses: pypa/cibuildwheel@v2.23.2 + uses: pypa/cibuildwheel@v3.1.1 - uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/build-manylinux.yml b/.github/workflows/build-manylinux.yml index fea79ee004..1c0679b9eb 100644 --- a/.github/workflows/build-manylinux.yml +++ b/.github/workflows/build-manylinux.yml @@ -76,7 +76,7 @@ jobs: CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }} CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }} - uses: pypa/cibuildwheel@v2.23.2 + uses: pypa/cibuildwheel@v3.1.1 # We upload the generated files under github actions assets - name: Upload dist diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index a794de62ff..75836e045d 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -45,7 +45,7 @@ jobs: version: "0.5.26" - name: Build and test wheels - uses: pypa/cibuildwheel@v2.23.2 + uses: pypa/cibuildwheel@v3.1.1 - uses: actions/upload-artifact@v4 with: diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 index 0513259466..b97797b7c1 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-aarch64 @@ -1,5 +1,5 @@ # pin version on image for CI stability -FROM quay.io/pypa/manylinux2014_aarch64:2025年03月09日-1 +FROM quay.io/pypa/manylinux2014_aarch64:2025年07月25日-1 ENV MAKEFLAGS="-j 4" ENV PG_DEP_PREFIX="/usr/local" diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 index 46ca8263c0..a51122c001 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-i686 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-i686 @@ -1,5 +1,5 @@ # pin version on image for CI stability -FROM quay.io/pypa/manylinux2014_i686:2025年03月09日-1 +FROM quay.io/pypa/manylinux2014_i686:2025年07月25日-1 ENV MAKEFLAGS="-j 4" ENV PG_DEP_PREFIX="/usr/local" diff --git a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 index 8ddf38eee5..2e76e2cbd6 100644 --- a/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 +++ b/buildconfig/manylinux-build/docker_base/Dockerfile-x86_64 @@ -1,5 +1,5 @@ # pin version on image for CI stability -FROM quay.io/pypa/manylinux2014_x86_64:2025年03月09日-1 +FROM quay.io/pypa/manylinux2014_x86_64:2025年07月25日-1 ENV MAKEFLAGS="-j 4" ENV PG_DEP_PREFIX="/usr/local" diff --git a/buildconfig/manylinux-build/docker_base/libsamplerate/build-libsamplerate.sh b/buildconfig/manylinux-build/docker_base/libsamplerate/build-libsamplerate.sh index 8e4f70915c..a9cadf79c4 100644 --- a/buildconfig/manylinux-build/docker_base/libsamplerate/build-libsamplerate.sh +++ b/buildconfig/manylinux-build/docker_base/libsamplerate/build-libsamplerate.sh @@ -20,7 +20,8 @@ cd ${FFTW} mkdir build cd build -cmake .. $PG_BASE_CMAKE_FLAGS +# CMake 3.5 or higher policy is required for buiding under CMake 4 +cmake .. $PG_BASE_CMAKE_FLAGS -DCMAKE_POLICY_VERSION_MINIMUM=3.5 make make install @@ -32,6 +33,7 @@ cd $LIBSAMPLERATE mkdir build cd build -cmake .. $PG_BASE_CMAKE_FLAGS +# CMake 3.5 or higher policy is required for buiding under CMake 4 +cmake .. $PG_BASE_CMAKE_FLAGS -DCMAKE_POLICY_VERSION_MINIMUM=3.5 make make install diff --git a/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh b/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh index 871056019c..5d5bb67ec1 100644 --- a/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh +++ b/buildconfig/manylinux-build/docker_base/ogg/build-ogg.sh @@ -3,7 +3,7 @@ set -e -x cd $(dirname `readlink -f "0ドル"`) -OGG=libogg-1.3.5 +OGG=libogg-1.3.6 VORBIS=libvorbis-1.3.7 curl -sL --retry 10 http://downloads.xiph.org/releases/ogg/${OGG}.tar.gz> ${OGG}.tar.gz @@ -22,6 +22,7 @@ cd .. tar xzf ${VORBIS}.tar.gz cd $VORBIS -cmake . $PG_BASE_CMAKE_FLAGS +# CMake 3.5 or higher policy is required for buiding under CMake 4 +cmake . $PG_BASE_CMAKE_FLAGS -DCMAKE_POLICY_VERSION_MINIMUM=3.5 make make install diff --git a/buildconfig/manylinux-build/docker_base/ogg/ogg.sha512 b/buildconfig/manylinux-build/docker_base/ogg/ogg.sha512 index 59fd7a19e1..8a00c9199d 100644 --- a/buildconfig/manylinux-build/docker_base/ogg/ogg.sha512 +++ b/buildconfig/manylinux-build/docker_base/ogg/ogg.sha512 @@ -1,2 +1,2 @@ -e4d798621bb04a62dcb831e58a444357635ab3bcb9efbdffa009cb0be1cafb5e72bf71cbcad5305aa5268a92076a03a7e564a19c0c8d54b93a05d9b03ad2da6b libogg-1.3.5.tar.gz +5e4a136506a8ce5ca55dfd7426303631285e3e001b52963ac66582cbfb59095a0f07e2df94e733d5f4037cc5416bc091f75a85bee3db6056d806f8fe30a0e28a libogg-1.3.6.tar.gz 8a83ac9e9197f32fad4430946dba3927921320492f9e96cda546e8eb3981e2664da97f77e43cb197577ec056437785168ca7c4138f8bf7f2ba93899846932eb2 libvorbis-1.3.7.tar.gz diff --git a/pyproject.toml b/pyproject.toml index 84eca571dc..feec871ff5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,6 +19,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Games/Entertainment", @@ -75,8 +76,8 @@ install = ['--tags=runtime,python-runtime,pg-tag'] # dependencies. Here is where uv comes into the picture. It is an "installer" like pip, # but faster. It has been observed to save a couple of minutes of CI time. build-frontend = "build[uv]" -build = "cp3{9,10,11,12,13}-* pp3{10,11}-*" -skip = "*-musllinux_*" +build = "cp3{9,10,11,12,13,14}-* pp3{10,11}-*" +skip = ["*-musllinux_*", "cp31?t-*"] # build[uv] is verbose by default, so below flag is not needed here # build-verbosity = 3 @@ -117,6 +118,8 @@ only-binary = ["numpy"] # 1. skip all 32-bit manylinux (i686) # 2. skip all pypy+arm combinations +# 3. skip pypy 3.11 manylinux and cpython 3.14 manylinux (numpy has newer manylinux +# wheels for this which is incompatible with our manylinux version) [[tool.cibuildwheel.overrides]] -select = "{*-manylinux_i686,pp*-*{arm64,aarch64},pp311-manylinux_x86_64}" +select = "{*-manylinux_i686,pp*-*{arm64,aarch64},pp311-manylinux_x86_64,cp314-manylinux_*}" test-requires = [] diff --git a/setup.py b/setup.py index 001edc3e2c..1bf4831ece 100644 --- a/setup.py +++ b/setup.py @@ -44,6 +44,7 @@ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Games/Entertainment", From aafd42a65e34149cb67322c1cb0ff7c4382fcc00 Mon Sep 17 00:00:00 2001 From: Damiano <97639432+damusss@users.noreply.github.com> Date: Sat, 7 Jun 2025 12:16:09 +0200 Subject: [PATCH 6/9] Merge pull request #3438 from Starbuck5/cibuildwheel-enable-pypy --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index feec871ff5..0f116308a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,6 +81,11 @@ skip = ["*-musllinux_*", "cp31?t-*"] # build[uv] is verbose by default, so below flag is not needed here # build-verbosity = 3 +# In CIBW 2, defaults to pypy-enabled, but is throwing warnings about the +# default changing in CIBW 3. So since we use pypy, lets explicitly enable it. +# https://cibuildwheel.pypa.io/en/stable/options/#enable +enable = ["pypy"] + environment = { SDL_VIDEODRIVER="dummy", SDL_AUDIODRIVER="disk" } test-command = "python -m pygame.tests -v --exclude opengl,music,timing --time_out 300" test-requires = ["numpy"] From b6f40b00a0ea7e737a2493e91682e643dc6cde73 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+starbuck5@users.noreply.github.com> Date: 2025年7月27日 13:03:13 -0700 Subject: [PATCH 7/9] Update libdrm version to fix build See https://github.com/pygame-community/pygame-ce/pull/3481 --- .../manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum b/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum index 71a0ac9ba5..1666d67034 100644 --- a/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum +++ b/buildconfig/manylinux-build/docker_base/mesa/libdrm/libdrm.sha512sum @@ -1 +1 @@ -b593eb26be0f4e3aac44dfe8ec4e37d9e1a2666f9c86f2dcd3c32bd3e6fe376bfce7bd1c47af4d39b85b3d6f43ebf12f02704f055106872fb35f1d85b45286f3 drm-libdrm-2.4.123.tar.gz +8052839ffb2c81bc8c65e0e8e810e197ca6532fafdaf1acc181b97763068e68ba921035bb0e5675eb9c8d2ff6f32731e10d4a16f307c915e3b680453dd0e9ebd libdrm-libdrm-2.4.124.tar.gz From 548a4074e6b96cc27c283b18c5832defa19b9b02 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+starbuck5@users.noreply.github.com> Date: 2025年7月27日 13:08:55 -0700 Subject: [PATCH 8/9] Actually update libdrm version to actually fix build --- .../manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh b/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh index 4d2fe8a054..58972d90c7 100644 --- a/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh +++ b/buildconfig/manylinux-build/docker_base/mesa/libdrm/build-libdrm.sh @@ -6,10 +6,10 @@ cd $(dirname `readlink -f "0ドル"`) # The drm already available on manylinux docker images is too old for mesa, so # we need to compile the latest from source -DRM_VER="libdrm-2.4.123" -DRM="drm-$DRM_VER" +DRM_VER="libdrm-2.4.124" +DRM="libdrm-$DRM_VER" -curl -sL --retry 10 https://gitlab.freedesktop.org/mesa/drm/-/archive/$DRM_VER/$DRM.tar.gz> $DRM.tar.gz +curl -sL --retry 10 https://gitlab.freedesktop.org/mesa/libdrm/-/archive/$DRM_VER/$DRM.tar.gz> $DRM.tar.gz sha512sum -c libdrm.sha512sum tar xzf $DRM.tar.gz From 1da06f426bcc90825f220021edb46ebe51f29091 Mon Sep 17 00:00:00 2001 From: Starbuck5 <46412508+starbuck5@users.noreply.github.com> Date: 2025年7月27日 13:15:03 -0700 Subject: [PATCH 9/9] 2.5.5-again This commit builds the wheels for 2.5.5 w/ 3.14 and pypy 3.11 support. --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 946991bedd..7febae9ea3 100644 --- a/README.rst +++ b/README.rst @@ -189,7 +189,7 @@ See docs/licenses for licenses of dependencies. .. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1 -.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame-community/pygame-ce/2.5.2.svg +.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame-community/pygame-ce/2.5.5.svg :target: https://github.com/pygame-community/pygame-ce/compare/2.5.3...main .. |DocsStatus| image:: https://img.shields.io/website?down_message=offline&label=docs&up_message=online&url=https%3A%2F%2Fpyga.me%2Fdocs%2F

AltStyle によって変換されたページ (->オリジナル) /