forked from pygame-community/pygame-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyproject.toml
More file actions
170 lines (151 loc) 路 6.5 KB
/
Copy pathpyproject.toml
File metadata and controls
170 lines (151 loc) 路 6.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
[project]
name = "pygame-ce"
version = "3.0.0.dev1"
description = "Python Game Development"
readme = "README.rst" # for long description
requires-python = ">=3.10"
license = {text = "LGPL v2.1"}
authors = [{name = "A community project"}]
classifiers = [
"Development Status :: 5 - Production/Stable",
"License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)",
"Programming Language :: Assembly",
"Programming Language :: C",
"Programming Language :: Cython",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"Programming Language :: Python :: 3.15",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Games/Entertainment",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: MIDI",
"Topic :: Multimedia :: Sound/Audio :: Players",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Graphics :: Capture :: Digital Camera",
"Topic :: Multimedia :: Graphics :: Capture :: Screen Capture",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
"Topic :: Multimedia :: Graphics :: Viewers",
"Topic :: Software Development :: Libraries :: pygame",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
"Typing :: Typed"
]
[project.urls]
homepage = "https://pyga.me"
"Bug Reports" = "https://github.com/pygame-community/pygame-ce/issues"
"Documentation" = "https://pyga.me/docs"
"Release Notes" = "https://github.com/pygame-community/pygame-ce/releases"
"Source" = "https://github.com/pygame-community/pygame-ce"
[project.entry-points.pyinstaller40]
hook-dirs = 'pygame.__pyinstaller:get_hook_dirs'
[project.entry-points."briefcase.bootstraps"]
pygame_ce = 'pygame.__briefcase.pygame_ce:PygameCEGuiBootstrap'
[build-system]
requires = [
"meson-python<=0.20.0",
"meson<=1.11.2",
"ninja<=1.13.0",
"cython<=3.2.9",
"sphinx<=8.2.3",
"astroid<4.0.0",
"sphinx-autoapi<=3.6.0",
"pyproject-metadata!=0.9.1",
]
build-backend = 'mesonpy'
[tool.meson-python.args]
install = ['--tags=runtime,python-runtime,pg-tag']
# uncomment to get werror locally
# setup = ["-Derror_on_warns=true"]
[tool.cibuildwheel]
# The default build-frontend is "pip", but we use the recommended "build" frontend.
# build (AKA pypa/build) is a simple tool that just focusses on one thing: building
# wheels. build still needs to interact with a pip-like tool to handle build-time
# 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]"
# here we build wheels for all supported python versions. We do not support musllinux
# and free threaded builds as of now. We also skip Python 3.10 build on ARM Windows
# because it is very very unlikely to be used (numpy does it too).
build = "cp3{10,11,12,13,14,15}-* pp311-*"
skip = ["*-musllinux_*", "cp31?t-*", "cp310-win_arm64"]
# 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"]
[tool.cibuildwheel.config-settings]
setup-args = [
"-Derror_on_warns=true",
"-Dvsenv=true", # same effect as passing --vsenv
"-Derror_docs_missing=true",
]
[tool.cibuildwheel.pyodide]
build = "cp313-*" # build only for the latest python version.
# EMSDK path is hardcoded here, and has to be manually kept updated with updates
# to cibuildwheel and/or pyodide.
before-build = """
sed -i 's/var SUPPORT_LONGJMP *= *[^;]*;/var SUPPORT_LONGJMP = "wasm";/' \
/home/runner/.cache/cibuildwheel/pyodide-build-0.39.0/0.29.4/emsdk/upstream/emscripten/src/settings.js &&
embuilder --pic --force build \
sdl2 libhtml5 sdl2_ttf 'sdl2_mixer:formats=ogg,mp3,mod,mid' \
'sdl2_image:formats=bmp,gif,jpg,lbm,pcx,png,pnm,qoi,svg,tga,xcf,xpm,xv'
"""
test-command = "" # TODO: figure out how to test
# cibuildwheel 4.0 now uses delvewheel to try to fix up Windows wheels with DLLs, which fails
# out of the box with our CI. And do we really want something messing with our DLLs?
# The status quo is that we add our resources to the build explicitly, that should be okay to
# continue, so lets just turn this off for now.
# Maybe it can be reinvestigated in the future.
[tool.cibuildwheel.windows]
repair-wheel-command = ""
[tool.ruff]
exclude = [
"buildconfig/*.py",
"buildconfig/stubs/pygame/typing.pyi",
"docs/reST/",
"setup.py",
]
[tool.ruff.lint]
select = ["I"]
[tool.ruff.lint.isort]
combine-as-imports = true
[tool.ruff.format]
quote-style = "preserve"
# numpy is a test dependency, but we build for systems that numpy doesn't have
# binary wheels for. In such cases, we do not want to waste CI time building
# numpy from source. So, we are gonna force numpy to be "only-binary" and skip
# numpy on platforms that it doesn't have wheels for
[tool.uv.pip]
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)
# 4. skip all 3.15 (numpy doesn't have release with wheels yet)
[[tool.cibuildwheel.overrides]]
select = "{*-manylinux_i686,pp*-*{arm64,aarch64},pp311-manylinux_x86_64,cp314-manylinux_*,cp315-*}"
test-requires = []
# On MacOS 3.15 x86_64 compilation running on an ARM64 runner, with
# build-frontend="build[uv]", I get the error:
#
# The built wheel `markupsafe-3.0.3-cp315-cp315-macosx_10_15_x86_64.whl`
# < is not compatible with the current Python 3.15 on macOS aarch64
#
# In the uv source, it says "this should never happen". But I'm not sure if
# it's a bug in CIBW, UV, build, or something else.
# ANYWAYS, it seems to work with build based on pip, so lets do that.
[[tool.cibuildwheel.overrides]]
select = "cp315-macosx_x86_64"
build-frontend = "build"