Skip to content

Commit cb15ddc

Browse files
committed
fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! fixup! Upgrade to use SDL3 version of libtcod
1 parent 232fe9b commit cb15ddc

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

.github/workflows/python-package.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
4848
with:
4949
install-linux-dependencies: true
50+
build-type: "Debug"
5051
version: "3.2.14"
5152
- uses: actions/checkout@v4
5253
with:
@@ -123,10 +124,11 @@ jobs:
123124
run: |
124125
sudo apt-get update
125126
sudo apt-get install xvfb
126-
- uses: libsdl-org/setup-sdl@v1
127+
- uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
127128
if: runner.os == 'Linux'
128129
with:
129130
install-linux-dependencies: true
131+
build-type: "Release"
130132
version: "3.2.14"
131133
- name: Install Python dependencies
132134
run: |
@@ -165,10 +167,11 @@ jobs:
165167
needs: [ruff, mypy, sdist]
166168
runs-on: ubuntu-latest
167169
steps:
168-
- uses: libsdl-org/setup-sdl@v1
170+
- uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
169171
if: runner.os == 'Linux'
170172
with:
171173
install-linux-dependencies: true
174+
build-type: "Debug"
172175
version: "3.2.14"
173176
- uses: actions/checkout@v4
174177
with:
@@ -206,10 +209,11 @@ jobs:
206209
- name: Install Python dependencies
207210
run: |
208211
python -m pip install --upgrade pip tox
209-
- uses: libsdl-org/setup-sdl@v1
212+
- uses: libsdl-org/setup-sdl@6574e20ac65ce362cd12f9c26b3a5e4d3cd31dee
210213
if: runner.os == 'Linux'
211214
with:
212215
install-linux-dependencies: true
216+
build-type: "Debug"
213217
version: "3.2.14"
214218
- name: Run tox
215219
run: |

setup.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,16 @@ def check_sdl_version() -> None:
4242
return
4343
needed_version = "{}.{}.{}".format(*SDL_VERSION_NEEDED)
4444
try:
45-
sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607
46-
except FileNotFoundError as exc:
47-
msg = (
48-
f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}."
49-
"\nsdl3-config must be on PATH."
50-
)
51-
raise RuntimeError(msg) from exc
45+
sdl_version_str = subprocess.check_output(["pkg-config", "sdl3", "--version"], universal_newlines=True).strip() # noqa: S603, S607
46+
except FileNotFoundError:
47+
try:
48+
sdl_version_str = subprocess.check_output(["sdl3-config", "--version"], universal_newlines=True).strip() # noqa: S603, S607
49+
except FileNotFoundError as exc:
50+
msg = (
51+
f"libsdl3-dev or equivalent must be installed on your system and must be at least version {needed_version}."
52+
"\nsdl3-config must be on PATH."
53+
)
54+
raise RuntimeError(msg) from exc
5255
print(f"Found SDL {sdl_version_str}.")
5356
sdl_version = tuple(int(s) for s in sdl_version_str.split("."))
5457
if sdl_version < SDL_VERSION_NEEDED:

0 commit comments

Comments
 (0)