Skip to content

Commit 1538f09

Browse files
committed
Add banner in _pythonscript_initialize, test 2 is passing \o/
1 parent 7734ff6 commit 1538f09

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ jobs:
124124
ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless"
125125
python tests/run.py 0-gdscript $ARGS
126126
python tests/run.py 1-gdextension $ARGS
127+
python tests/run.py 2-pythonscript-init $ARGS
127128
# TODO
128-
# python tests/run.py 2-pythonscript-init $ARGS
129129
# python tests/run.py 3-pythonscript-cython-only $ARGS
130130
131131
# - name: 'Generate artifact archive'
@@ -222,8 +222,8 @@ jobs:
222222
ARGS="--build-dir=build/ ${{ steps.setup-godot.outputs.EXTRA_RUN_TESTS_ARGS }} -- --headless"
223223
python tests/run.py 0-gdscript $ARGS
224224
python tests/run.py 1-gdextension $ARGS
225+
python tests/run.py 2-pythonscript-init $ARGS
225226
# TODO
226-
# python tests/run.py 2-pythonscript-init $ARGS
227227
# python tests/run.py 3-pythonscript-cython-only $ARGS
228228
229229
# - name: 'Install Mesa3D OpenGL'

src/_pythonscript.pyx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,11 @@ cdef api void _pythonscript_early_init() with gil:
195195

196196
cdef api void _pythonscript_initialize(int p_level) with gil:
197197
if p_level == GDEXTENSION_INITIALIZATION_SERVERS:
198+
import sys
199+
from godot._version import __version__ as pythonscript_version
200+
201+
cooked_sys_version = '.'.join(map(str, sys.version_info))
202+
print(f"Pythonscript {pythonscript_version} (CPython {cooked_sys_version})", flush=True)
198203
pass
199204

200205
# Language registration must be done at `GDEXTENSION_INITIALIZATION_SERVERS`

0 commit comments

Comments
 (0)