Skip to content

Commit 7054780

Browse files
committed
Build SDL3 for ReadTheDocs workflow
Note PKG_CONFIG_PATH on pkg-config errors to debug issues with the environment sent to Python setup scripts.
1 parent 50721e8 commit 7054780

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.readthedocs.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,17 @@ build:
99
tools:
1010
python: "3.11"
1111
apt_packages:
12-
- libsdl3-dev
12+
- build-essential
13+
- make
14+
- pkg-config
15+
- cmake
16+
- ninja-build
17+
jobs:
18+
pre_install:
19+
- git clone --depth 1 --branch release-3.2.16 https://github.com/libsdl-org/SDL.git sdl_repo
20+
- cmake -S sdl_repo -B sdl_build -D CMAKE_INSTALL_PREFIX=~/.local
21+
- cmake --build sdl_build --config Debug
22+
- cmake --install sdl_build
1323

1424
submodules:
1525
include: all

setup.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
from __future__ import annotations
55

6+
import os
67
import platform
78
import subprocess
89
import sys
@@ -55,6 +56,10 @@ def check_sdl_version() -> None:
5556
"\nsdl3-config must be on PATH."
5657
)
5758
raise RuntimeError(msg) from exc
59+
except subprocess.CalledProcessError as exc:
60+
if sys.version_info >= (3, 11):
61+
exc.add_note(f"Note: {os.environ.get('PKG_CONFIG_PATH')=}")
62+
raise
5863
print(f"Found SDL {sdl_version_str}.")
5964
sdl_version = tuple(int(s) for s in sdl_version_str.split("."))
6065
if sdl_version < SDL_VERSION_NEEDED:

0 commit comments

Comments
 (0)