Skip to content

Commit f6fac56

Browse files
committed
Merge remote-tracking branch 'upstream/main' into move-image-docs
2 parents e4e64f6 + 158b227 commit f6fac56

File tree

401 files changed

+5710
-3222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+5710
-3222
lines changed

.github/workflows/build-debian-multiarch.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ env:
4949
jobs:
5050
build-multiarch:
5151
name: Debian (Bookworm - 12) [${{ matrix.arch }}]
52-
runs-on: ubuntu-24.04
52+
runs-on: ubuntu-22.04
5353

5454
strategy:
5555
fail-fast: false # if a particular matrix build fails, don't skip the rest
@@ -68,7 +68,7 @@ jobs:
6868
- uses: actions/[email protected]
6969

7070
- name: Build sources and run tests
71-
uses: uraimo/run-on-arch-action@v2.8.1
71+
uses: uraimo/run-on-arch-action@v3.0.0
7272
id: build
7373
with:
7474
arch: ${{ matrix.base_image && 'none' || matrix.arch }}
@@ -118,7 +118,7 @@ jobs:
118118
test-armv7-on-armv6:
119119
needs: build-multiarch
120120
name: Debian (Bookworm - 12) [build - armv7, test - armv6]
121-
runs-on: ubuntu-24.04
121+
runs-on: ubuntu-22.04
122122
steps:
123123
- name: Download all multiarch artifacts
124124
uses: actions/download-artifact@v4
@@ -134,7 +134,7 @@ jobs:
134134
done
135135
136136
- name: Test armv7 wheel on armv6
137-
uses: uraimo/run-on-arch-action@v2.8.1
137+
uses: uraimo/run-on-arch-action@v3.0.0
138138
with:
139139
arch: armv6
140140
distro: bookworm

.github/workflows/build-macos.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151

5252
- name: Test for Mac Deps cache hit
5353
id: macdep-cache
54-
uses: actions/[email protected].0
54+
uses: actions/[email protected].3
5555
with:
5656
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
5757
# The hash of all files in buildconfig manylinux-build and macdependencies is
@@ -118,26 +118,26 @@ jobs:
118118
- uses: actions/[email protected]
119119

120120
- name: pip cache
121-
uses: actions/[email protected].0
121+
uses: actions/[email protected].3
122122
with:
123123
path: ~/Library/Caches/pip # This cache path is only right on mac
124124
key: pip-cache-${{ matrix.macarch }}-${{ matrix.os }}
125125

126126
- name: Fetch Mac deps
127127
id: macdep-cache
128-
uses: actions/[email protected].0
128+
uses: actions/[email protected].3
129129
with:
130130
path: ${{ github.workspace }}/pygame_mac_deps_${{ matrix.macarch }}
131131
key: macdep-${{ hashFiles('buildconfig/manylinux-build/**') }}-${{ hashFiles('buildconfig/macdependencies/*.sh') }}-${{ matrix.macarch }}
132132
fail-on-cache-miss: true
133133

134134
- name: Install uv for speed
135-
uses: yezz123/setup-uv@v4
135+
uses: astral-sh/setup-uv@v5
136136
with:
137-
uv-version: "0.5.4"
137+
version: "0.5.26"
138138

139139
- name: Build and test wheels
140-
uses: pypa/cibuildwheel@v2.22.0
140+
uses: pypa/cibuildwheel@v2.23.2
141141

142142
- uses: actions/upload-artifact@v4
143143
with:

.github/workflows/build-manylinux.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ jobs:
5555
- uses: actions/[email protected]
5656

5757
- name: Log in to the Container registry
58-
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
58+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772
5959
with:
6060
registry: ghcr.io
6161
username: ${{ github.actor }}
@@ -68,14 +68,14 @@ jobs:
6868

6969
- name: Extract metadata (tags, labels) for Docker
7070
id: meta
71-
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96
71+
uses: docker/metadata-action@902fa8ec7d6ecbf8d84d538b9b233a880e428804
7272
with:
7373
images: ghcr.io/${{ github.repository }}_${{ matrix.arch }}
7474
tags: type=raw,value=${{ hashFiles('buildconfig/manylinux-build/**') }}
7575

7676
- name: Build and push Docker image
7777
if: steps.inspect.outcome == 'failure'
78-
uses: docker/build-push-action@67a2d409c0a876cbe6b11854e3e25193efe4e62d
78+
uses: docker/build-push-action@471d1dc4e07e5cdedd4c2171150001c434f0b7a4
7979
with:
8080
context: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base
8181
file: ${{ github.workspace }}/buildconfig/manylinux-build/docker_base/Dockerfile-${{ matrix.arch }}
@@ -93,7 +93,7 @@ jobs:
9393
CIBW_MANYLINUX_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
9494
CIBW_MANYLINUX_PYPY_AARCH64_IMAGE: ghcr.io/${{ github.repository }}_aarch64:${{ steps.meta.outputs.version }}
9595

96-
uses: pypa/cibuildwheel@v2.22.0
96+
uses: pypa/cibuildwheel@v2.23.2
9797

9898
# We upload the generated files under github actions assets
9999
- name: Upload dist

.github/workflows/build-sdl3.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,17 @@ jobs:
9797
cmake --build . --config Release --parallel
9898
sudo cmake --install . --config Release
9999
100+
- name: Install SDL3_ttf
101+
if: matrix.os != 'windows-latest'
102+
run: |
103+
git clone https://github.com/libsdl-org/SDL_ttf
104+
cd SDL_ttf
105+
mkdir build
106+
cd build
107+
cmake -DCMAKE_BUILD_TYPE=Release ..
108+
cmake --build . --config Release --parallel
109+
sudo cmake --install . --config Release
110+
100111
- name: Build with SDL3
101112
run: python3 dev.py build --sdl3
102113

.github/workflows/build-ubuntu-coverage.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# this workflow generates C code coverage information from the unit test
1+
# This workflow generates C code coverage information from the unit test
22
# suite. Note that for intrinsics, it only runs what gets compiled
33
# and would naturally run. It also is limited to what can run in
44
# a CI environment
55
# IMPORTANT: binaries are not to be uploaded from this workflow!
66

77
name: Ubuntu coverage
88

9-
# Run CI only when a release is created, on changes to main branch, or any PR
10-
# to main. Do not run CI on any other branch. Also, skip any non-source changes
9+
# Run CI only on changes to main branch, or any PR to main.
10+
# Do not run CI on any other branch. Also, skip any non-source changes
1111
# from running on CI
1212
on:
1313
push:
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
# This workflow runs a build with a python version that has debug symbols
2+
# Update this workflow when our min/max python minor versions update
3+
# This workflow is necessary to ensure that we can build and run with
4+
# a debug python build without too much worrying about SIGABRT being thrown
5+
# IMPORTANT: binaries are not to be uploaded from this workflow!
6+
7+
name: Ubuntu debug python
8+
defaults:
9+
run:
10+
shell: bash -leo pipefail {0}
11+
12+
# Run CI only on changes to main branch, or any PR to main.
13+
# Do not run CI on any other branch. Also, skip any non-source changes
14+
# from running on CI
15+
on:
16+
push:
17+
branches: main
18+
paths-ignore:
19+
- 'docs/**'
20+
- 'examples/**'
21+
- '.gitignore'
22+
- '*.rst'
23+
- '*.md'
24+
- '.github/workflows/*.yml'
25+
# re-include current file to not be excluded
26+
- '!.github/workflows/build-ubuntu-debug-python.yml'
27+
28+
pull_request:
29+
branches: main
30+
paths-ignore:
31+
- 'docs/**'
32+
- 'examples/**'
33+
- '.gitignore'
34+
- '*.rst'
35+
- '*.md'
36+
- '.github/workflows/*.yml'
37+
# re-include current file to not be excluded
38+
- '!.github/workflows/build-ubuntu-debug-python.yml'
39+
40+
concurrency:
41+
group: ${{ github.workflow }}-${{ github.ref }}-ubuntu-debug-python
42+
cancel-in-progress: true
43+
44+
jobs:
45+
debug_python:
46+
runs-on: ${{ matrix.os }}
47+
strategy:
48+
fail-fast: false # if a particular matrix build fails, don't skip the rest
49+
matrix:
50+
os: [ ubuntu-24.04 ]
51+
# check our min python (minor) version and our max python (minor) version
52+
python: [
53+
3.9.21,
54+
3.13.1
55+
]
56+
57+
env:
58+
# Pip now forces us to either make a venv or set this flag, so we will do
59+
# this
60+
PIP_BREAK_SYSTEM_PACKAGES: 1
61+
# We are using dependencies installed from apt
62+
PG_DEPS_FROM_SYSTEM: 1
63+
64+
steps:
65+
- uses: actions/[email protected]
66+
67+
- name: Install pygame-ce deps
68+
# https://github.com/actions/runner-images/issues/7192
69+
# https://github.com/orgs/community/discussions/47863
70+
run: |
71+
sudo apt-get update --fix-missing
72+
73+
sudo apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev -y
74+
75+
- name: Install pyenv
76+
run: |
77+
sudo apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
78+
curl https://pyenv.run | bash
79+
80+
echo -e 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
81+
echo -e 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
82+
echo -e 'eval "$(pyenv init --path)"' >> ~/.bash_profile
83+
echo -e 'eval "$(pyenv init -)"' >> ~/.bash_profile
84+
85+
- name: Cache debug python build
86+
id: cache-python
87+
uses: actions/[email protected]
88+
with:
89+
key: ${{ matrix.python }}
90+
path: ~/.pyenv/versions/${{ matrix.python }}-debug/**
91+
92+
- name: Build debug python
93+
id: build
94+
if: steps.cache-python.outputs.cache-hit != 'true'
95+
run: pyenv install ${{ matrix.python }} --debug -v
96+
97+
- name: Build pygame-ce
98+
id: build-pygame-ce
99+
run: |
100+
pyenv global ${{ matrix.python }}-debug
101+
python dev.py build --lax
102+
103+
- name: Run tests
104+
env:
105+
SDL_VIDEODRIVER: "dummy"
106+
SDL_AUDIODRIVER: "disk"
107+
run: |
108+
pyenv global ${{ matrix.python }}-debug
109+
python -m pygame.tests -v --exclude opengl,music,timing --time_out 300

.github/workflows/build-windows.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ jobs:
5757
arch: ${{ matrix.msvc-dev-arch }}
5858

5959
- name: Install uv for speed
60-
uses: yezz123/setup-uv@v4
60+
uses: astral-sh/setup-uv@v5
6161
with:
62-
uv-version: "0.5.4"
62+
version: "0.5.26"
6363

6464
- name: Build and test wheels
65-
uses: pypa/cibuildwheel@v2.22.0
65+
uses: pypa/cibuildwheel@v2.23.2
6666

6767
- uses: actions/upload-artifact@v4
6868
with:

.github/workflows/release-gh-draft.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
uses: ./.github/workflows/build-ubuntu-sdist.yml
1919

2020
draft-release:
21-
needs: [manylinux-aarch64, manylinux, macos, windows, sdist]
21+
needs: [manylinux, macos, windows, sdist]
2222
runs-on: ubuntu-latest
2323
permissions:
2424
id-token: write
@@ -41,7 +41,7 @@ jobs:
4141
run: echo "VER=${GITHUB_REF_NAME#'release/'}" >> $GITHUB_OUTPUT
4242

4343
- name: Generate release attestation
44-
uses: actions/attest-build-provenance@v2.1.0
44+
uses: actions/attest-build-provenance@v2.2.3
4545
with:
4646
subject-path: "pygame-wheels/*"
4747

.github/workflows/release-pypi.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
- uses: actions/[email protected]
1616

1717
- name: Pull all release assets
18-
uses: robinraju/release-downloader@v1.11
18+
uses: robinraju/release-downloader@v1.12
1919
with:
2020
releaseId: ${{ github.event.release.id }}
2121
fileName: "*"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
# mypy
3333
.mypy_cache/
3434

35+
# Ruff
36+
.ruff_cache
37+
3538
# Other
3639
envdev*
3740
.virtualenv*

.pre-commit-config.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ repos:
2828
- repo: https://github.com/astral-sh/ruff-pre-commit
2929
rev: v0.4.2
3030
hooks: # See pyproject.toml for configuration options.
31+
- id: ruff
32+
name: ruff-sort-imports
33+
args: [ --select, I, --fix ]
3134
- id: ruff-format # Run the formatter
3235
types_or: [ python, pyi, jupyter ]
3336

README.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
|Python3| |GithubCommits| |BlackFormatBadge|
1010

1111
**English** `简体中文`_ `繁體中文`_ `Français`_ `فارسی`_ `Español`_ `日本語`_ `Italiano`_ `Русский`_
12-
---------------------------------------------------------------------------------------------------
12+
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
1313

1414
Pygame_ is a free and open-source cross-platform library
1515
for the development of multimedia applications like video games using Python.
@@ -189,8 +189,8 @@ See docs/licenses for licenses of dependencies.
189189

190190
.. |Python3| image:: https://img.shields.io/badge/python-3-blue.svg?v=1
191191

192-
.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame-community/pygame-ce/2.5.1.svg
193-
:target: https://github.com/pygame-community/pygame-ce/compare/2.5.1...main
192+
.. |GithubCommits| image:: https://img.shields.io/github/commits-since/pygame-community/pygame-ce/2.5.2.svg
193+
:target: https://github.com/pygame-community/pygame-ce/compare/2.5.2...main
194194

195195
.. |DocsStatus| image:: https://img.shields.io/website?down_message=offline&label=docs&up_message=online&url=https%3A%2F%2Fpyga.me%2Fdocs%2F
196196
:target: https://pyga.me/docs/

buildconfig/Setup.Android.SDL2.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,5 @@ math src_c/math.c $(SDL) $(DEBUG)
6262
pixelcopy src_c/pixelcopy.c $(SDL) $(DEBUG)
6363
newbuffer src_c/newbuffer.c $(SDL) $(DEBUG)
6464
window src_c/window.c $(SDL) $(DEBUG)
65+
_render src_c/render.c $(SDL) $(DEBUG)
6566
geometry src_c/geometry.c $(SDL) $(DEBUG)

buildconfig/Setup.Emscripten.SDL2.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ rect src_c/void.c
6464
rwobject src_c/void.c
6565
system src_c/void.c
6666
window src_c/void.c
67+
_render src_c/void.c
6768
geometry src_c/void.c
6869

6970
#_sdl2.controller src_c/_sdl2/controller.c $(SDL) $(DEBUG) -Isrc_c

buildconfig/Setup.SDL2.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ newbuffer src_c/newbuffer.c $(SDL) $(DEBUG)
7575
system src_c/system.c $(SDL) $(DEBUG)
7676
geometry src_c/geometry.c $(SDL) $(DEBUG)
7777
window src_c/window.c $(SDL) $(DEBUG)
78+
_render src_c/render.c $(SDL) $(DEBUG)

0 commit comments

Comments
 (0)