-
-
Notifications
You must be signed in to change notification settings - Fork 35
Support for building python-tcod
with Python 3.13 --disable-gil
(no-GIL) build
#161
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I'm interested in free-threaded no-GIL builds. From what little research I've done, I suspect the issue is in CFFI itself and that issue might've already been fixed but not in an official release. So I suspect that you don't need to remove references to Otherwise I'll need to install a GIL-less version of Python on the GitHub workflows in order to verify any fixes. |
I tried
but did not help if you have meant that ... |
I did mean that. I'm unsure what to try next. |
somehow it remains, although I changed the build script. This limitied api is only needed due to older python versions, right ? Probably you do not want to discard those... |
I assume you've also removed the |
yes
i will look again tomorrow...maybe AI has also some further hints |
this is what the AI analzed:
|
There is a blatant lack of specificity here from the AI. The AI seems to state stuff that is relevant but is unable to properly explain how everything interacts with each other. CFFI needs to include What I notice is that CFFI internally uses |
I have tried that also but no success....so I guess there is no easy solution for now... |
Uh oh!
There was an error while loading. Please reload this page.
Hi there 👋
First off, thank you for maintaining
python-tcod
— it's a really valuable library for roguelike development!I've been experimenting with Python 3.13's new
--disable-gil
feature (based on the free-threaded no-GIL branch), and I wanted to see how wellpython-tcod
builds and works in that environment.🛠 What I tried:
Cloned the repository and initialized submodules.
Patched
build_libtcod.py
to conditionally skipPy_LIMITED_API
whenPy_GIL_DISABLED
is detected viasysconfig.get_config_var("Py_GIL_DISABLED")
.Removed
py-limited-api
entries frompyproject.toml
.Attempted to install in editable mode with:
pip install -e .
The build still fails due to low-level C header issues during the CFFI extension build:
🧠 My understanding:
It seems that, despite disabling
Py_LIMITED_API
, some core Python headers or assumptions inlibtcod
ortcod._libtcod
still expect GIL-based behavior and are not currently compatible with the free-threaded interpreter.🤛 Feature Request:
Would it be possible to support building
python-tcod
on GIL-disabled Python versions in the future?Even limited or experimental support (e.g. via conditional compilation) would be amazing for those of us exploring Python's no-GIL future.
But I cannot judge the effort.
The text was updated successfully, but these errors were encountered: