Skip to content

Commit 48b3799

Browse files
authored
Merge branch 'main' into matiiss-add-mask-to_surface-area-kwarg
2 parents 1565a39 + 57c3222 commit 48b3799

File tree

591 files changed

+30785
-139391
lines changed

Some content is hidden

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

591 files changed

+30785
-139391
lines changed

.circleci/config.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

src_py/.editorconfig renamed to .editorconfig

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,18 @@ root=true
44
end_of_line = lf
55
insert_final_newline = true
66

7-
# The settings for C (*.c and *.h) files are mirrored in src_c/.clang-format.
8-
# Keep them in sync.
9-
[*.{c,h}]
7+
[*.{c,h,py,pyx,pyi}]
108
indent_style = space
119
indent_size = 4
1210
tab_width = 4
11+
charset = utf-8
1312
trim_trailing_whitespace = true
13+
14+
# The settings for C (*.c and *.h) files are mirrored in src_c/.clang-format.
15+
# Keep them in sync.
16+
[*.{c,h}]
1417
max_line_length = 79
1518

16-
[*.{py,pyx}]
17-
indent_style = space
18-
indent_size = 4
19-
charset = utf-8
19+
[*.{py,pyx,pyi}]
2020
file_type_emacs = python
21-
trim_trailing_whitespace = true
22-
max_line_length = 79
21+
max_line_length = 88

.gitattributes

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# define files/directories that won't be exported in an sdist
2+
# Keep in sync with MANIFEST.in
3+
.github/ export-ignore
4+
buildconfig/macdependencies/ export-ignore
5+
buildconfig/manylinux-build/ export-ignore
6+
7+
.editorconfig export-ignore
8+
.gitattributes export-ignore
9+
.gitignore export-ignore
10+
.pre-commit-config.yaml export-ignore

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# example. The documentation can be seen here:
77
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
88

9-
* @pygame-community/pygame-contributing-admins
9+
* @pygame-community/pygame-senior-reviewers

.github/ISSUE_TEMPLATE/blank_issue.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
name: 🗎 Blank Issue
33
about: A blank issue. For those who know what they are doing.
44
title: ''
5-
labels:
5+
labels:
66
assignees: ''
77

8-
---
8+
---

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,32 @@ assignees: ''
1111

1212
**Environment:**
1313

14-
You can get some of this info from the text that pops up in the console when you run a pygame program.
14+
If possible, please include the output of `pygame.print_debug_info()` from your program in your bug report. It looks something
15+
like this:
1516

16-
- **Operating system** (e.g. Windows, Linux(Debian), Linux(Ubuntu), Mac):
17-
- **Python version** (e.g. 3.11.1, 3.8.5) :
18-
- **SDL version** (e.g. SDL 2.0.12):
19-
- **PyGame version** (e.g. 2.0.0.dev10, 1.9.6):
17+
```
18+
pygame-ce 6.6.6 (SDL 2.30.3, Python 3.11.1)
19+
Platform: Windows-10-10.0.22631-SP0
20+
System: Windows
21+
System Version: 10.0.22631
22+
Processor: AMD64 Family 23 Model 113 Stepping 0, AuthenticAMD
23+
Architecture: Bits: 64bit Linkage: WindowsPE
24+
25+
Python: CPython 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)]
26+
pygame version: 2.5.0.dev3
27+
SDL versions: Linked: 2.30.3 Compiled: 2.30.3
28+
SDL Mixer versions: Linked: 2.8.0 Compiled: 2.8.0
29+
SDL Font versions: Linked: 2.22.0 Compiled: 2.22.0
30+
SDL Image versions: Linked: 2.8.2 Compiled: 2.8.2
31+
Freetype versions: Linked: 2.11.1 Compiled: 2.11.1
32+
33+
Display Driver: windows
34+
Mixer Driver: wasapi
35+
```
36+
If you can't get the debug output, any of the environment details included in it that you do know would be useful
37+
in diagnosing the issue & helping you.
38+
39+
Other environment details, not included in `print_debug_info()`, that might help:
2040
- **Relevant hardware** (e.g. if reporting a bug about a controller, tell us the brand & name of it):
2141

2242
**Current behavior:**

.github/ISSUE_TEMPLATE/enhancement.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ assignees: ''
99

1010
**Description**
1111

12-
Describe your enhancement, as clearly as possible.
12+
Describe your enhancement, as clearly as possible.

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

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,26 +35,45 @@ concurrency:
3535
group: ${{ github.workflow }}-${{ github.ref }}-debian-multiarch
3636
cancel-in-progress: true
3737

38+
# this command is called in two places, so save it in an env first
39+
env:
40+
INSTALL_CMD: |
41+
apt-get update --fix-missing
42+
apt-get upgrade -y
43+
apt-get install build-essential meson cython3 -y
44+
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev -y
45+
apt-get install libfreetype6-dev libportmidi-dev fontconfig -y
46+
apt-get install python3-dev python3-pip python3-wheel python3-sphinx -y
47+
pip3 install meson-python "sphinx-autoapi<=3.3.2" --break-system-packages
48+
3849
jobs:
3950
build-multiarch:
40-
name: Debian (Bullseye - 11) [${{ matrix.arch }}]
51+
name: Debian (Bookworm - 12) [${{ matrix.arch }}]
4152
runs-on: ubuntu-22.04
4253

4354
strategy:
4455
fail-fast: false # if a particular matrix build fails, don't skip the rest
4556
matrix:
4657
# maybe more things could be added in here in the future (if needed)
47-
arch: [s390x, ppc64le]
58+
include:
59+
- { arch: s390x, base_image: '' }
60+
- { arch: ppc64le, base_image: '' }
61+
- { arch: armv6, base_image: '' }
62+
# a custom base_image is specified in the armv7 case. This is done because
63+
# the armv6 image is just raspbian in disguise. And the wheel built on armv7
64+
# is going to be tested on armv6
65+
- { arch: armv7, base_image: 'balenalib/raspberrypi3-debian:bookworm' }
4866

4967
steps:
50-
- uses: actions/checkout@v4.1.1
68+
- uses: actions/checkout@v4.2.2
5169

5270
- name: Build sources and run tests
53-
uses: uraimo/run-on-arch-action@v2.6.0
71+
uses: uraimo/run-on-arch-action@v3.0.0
5472
id: build
5573
with:
56-
arch: ${{ matrix.arch }}
57-
distro: bullseye
74+
arch: ${{ matrix.base_image && 'none' || matrix.arch }}
75+
distro: ${{ matrix.base_image && 'none' || 'bookworm' }}
76+
base_image: ${{ matrix.base_image }}
5877

5978
# Not required, but speeds up builds
6079
githubToken: ${{ github.token }}
@@ -74,20 +93,58 @@ jobs:
7493
# builds don't have to re-install them. The image layer is cached
7594
# publicly in your project's package repository, so it is vital that
7695
# no secrets are present in the container state or logs.
77-
install: |
78-
apt-get update --fix-missing
79-
apt-get upgrade -y
80-
apt-get install libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev libfreetype6-dev libportmidi-dev libjpeg-dev fontconfig -y
81-
apt-get install python3-setuptools python3-dev python3-pip python3-wheel python3-sphinx -y
96+
install: ${{ env.INSTALL_CMD }}
97+
98+
# Build a wheel, install it for running unit tests.
99+
# pip does not know that ninja is installed, and tries to install it again.
100+
# so pass --ignore-dep ninja explicitly
101+
run: |
102+
echo "\nBuilding and installing pygame wheel\n"
103+
PIP_BREAK_SYSTEM_PACKAGES=1 python3 dev.py --ignore-dep ninja build --wheel /artifacts --lax
104+
echo "\nRunning tests\n"
105+
export SDL_VIDEODRIVER=dummy
106+
export SDL_AUDIODRIVER=disk
107+
python3 -m pygame.tests -v --exclude opengl,music,timing --time_out 300
108+
109+
# Upload the generated files under github actions assets section
110+
- name: Upload dist
111+
uses: actions/upload-artifact@v4
112+
with:
113+
name: pygame-multiarch-${{ matrix.arch }}-dist
114+
path: ~/artifacts/*.whl
82115

83-
# Build a wheel, install it for running unit tests
116+
# test wheels built on armv7 on armv6. Why?
117+
# because piwheels expects the same armv7 wheel to work on both armv7 and armv6
118+
test-armv7-on-armv6:
119+
needs: build-multiarch
120+
name: Debian (Bookworm - 12) [build - armv7, test - armv6]
121+
runs-on: ubuntu-22.04
122+
steps:
123+
- name: Download all multiarch artifacts
124+
uses: actions/download-artifact@v4
125+
with:
126+
name: pygame-multiarch-armv7-dist
127+
path: ~/artifacts
128+
129+
- name: Rename arm wheel in artifacts
130+
run: |
131+
cd ~/artifacts
132+
for f in *; do
133+
mv "$f" "${f//armv7l/armv6l}"
134+
done
135+
136+
- name: Test armv7 wheel on armv6
137+
uses: uraimo/run-on-arch-action@v3.0.0
138+
with:
139+
arch: armv6
140+
distro: bookworm
141+
githubToken: ${{ github.token }}
142+
dockerRunArgs: --volume ~/artifacts:/artifacts_new
143+
shell: /bin/sh
144+
install: ${{ env.INSTALL_CMD }}
84145
run: |
85-
export PIP_CONFIG_FILE=buildconfig/pip_config.ini
86-
echo "\nBuilding pygame wheel\n"
87-
python3 setup.py docs
88-
pip3 wheel . --wheel-dir /artifacts -vvv
89146
echo "\nInstalling wheel\n"
90-
pip3 install --no-index --pre --find-links /artifacts pygame-ce
147+
pip3 install --no-index --pre --break-system-packages --find-links /artifacts_new pygame-ce
91148
echo "\nRunning tests\n"
92149
export SDL_VIDEODRIVER=dummy
93150
export SDL_AUDIODRIVER=disk

.github/workflows/build-emsdk.yml

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -40,33 +40,12 @@ jobs:
4040
SDK_ARCHIVE: python3.11-wasm-sdk-Ubuntu-22.04.tar.lz4
4141
SDKROOT: /opt/python-wasm-sdk
4242

43-
# use the most recent cython from github, but pin on a commit for CI
44-
# stability. This is also needed to benefit from caching cython installs
45-
LATEST_CYTHON_COMMIT: 2f3a781dcca092ce95fbfef2736b12b0d1ab50dd # cython 3.0.0
46-
47-
WHEELHOUSE_CYTHON: /tmp/wheelhouse/cython
48-
4943
steps:
50-
- uses: actions/checkout@v4.1.1
51-
52-
- name: Cache Cython
53-
id: cache-cython
54-
uses: actions/cache@v3.3.2
55-
with:
56-
path: ${{ env.WHEELHOUSE_CYTHON }}
57-
key: wasm-ubuntu-cython-${{ env.LATEST_CYTHON_COMMIT }}-path-${{ env.WHEELHOUSE_CYTHON }}
58-
59-
# This builds the cython wheel and stores it in cache too
60-
- name: Download and build cython on cache miss
61-
if: steps.cache-cython.outputs.cache-hit != 'true'
62-
run: |
63-
mkdir -p $WHEELHOUSE_CYTHON
64-
pip wheel --wheel-dir $WHEELHOUSE_CYTHON git+https://github.com/cython/cython.git@$LATEST_CYTHON_COMMIT
44+
- uses: actions/checkout@v4.2.2
6545

66-
- name: Install latest cython and regen
46+
- name: Regen with latest cython (using system python3)
6747
run: |
68-
pip install --no-index --find-links $WHEELHOUSE_CYTHON --pre cython
69-
touch $(find | grep pxd$)
48+
pip3 install cython==3.0.10
7049
python3 setup.py cython_only
7150
7251
- name: Install python-wasm-sdk

0 commit comments

Comments
 (0)