[ ] pypy3 [_PyState_FindModule](https://docs.python.org/3/c-api/module.html# c.PyState_FindModule) is not defined on windows pypy3 (like in cpython XXXX, pypy2, pypy3 on linux+mac) disabled optional _freetype module on pypy3 windows.
Some findings.
pypy windows release doesn't come with pip. However, pypy.exe -m ensurepip works.
Translating on Windows pypy docs. With useful links to the compilers needed to build locally.
The C library they use is the same as the python.org 2.7 one. It says "VS 2008 runtime" on the [downloads page](https://pypy.org/download.html# release).
Python3 release of pypy apparently links to the same one as python 3.5 from python.org. (despite what the download page says).
this should mean we can use the same prebuilt SDL/png/etc libraries as normal.
ssize_t is not defined issue (it is for cpython XXXX).
there is an issue with the SDL.dll and other libraries not being found. Setting PATH environment manually fixed this. (it finds the dlls in cpython XXXX)
the python 3 docs states that PyState_AddModule must be called before PyState_FindModule, and this interface is all new for python 3.3 and higher. It seems PyPy does not yet implement either function. So both are needed for pygame?
What directory did you need to add to the PATH for SDL.dll? What directory are they installed to on cpython?
Hmm, I guess we could workaround and not have to use PyState_* API at all in the first place.
the python 3 docs states that PyState_AddModule must be called before PyState_FindModule, and this interface is all new for python 3.3 and higher. It seems PyPy does not yet implement either function. So both are needed for pygame?
That's a good catch, thanks! We use PyState_FindModule in display and freetype modules but don't use PyState_AddModule, this could be a reason for some of our display bugs
EDIT: Oh NVM seems like PyState_AddModule gets called implicitly when the module is imported
There’s a module clean up PR now… probably to be metered soon… and I wonder if that changes things for this issue. Perhaps display and free type modules are now ok.
It's been pushed to the next release, but that seems reasonable, I've been keeping up with the updates on this side and the pypy side, let's see how it goes.
Issue №423 opened by illume at 2018-03-19 13:09:17
pypy.exe pip install pygame --pre
)Some findings.
pypy.exe -m ensurepip
works.Comments
*mattip commented at 2018-03-24 18:31:17*
Nice progress. A couple of questions:
PyState_AddModule
must be called beforePyState_FindModule
, and this interface is all new for python 3.3 and higher. It seems PyPy does not yet implement either function. So both are needed for pygame?PATH
forSDL.dll
? What directory are they installed to on cpython?*stuaxo commented at 2021-09-20 00:36:49*
Does anybody have some info about the needed PyState_XXX APIs ?
There is an issue on Pypy asking to implement those APIs here - https://foss.heptapod.net/pypy/pypy/-/issues/3438
*ankith26 commented at 2021-12-12 06:35:07*
Hmm, I guess we could workaround and not have to use
PyState_*
API at all in the first place.That's a good catch, thanks! We use
PyState_FindModule
indisplay
andfreetype
modules but don't usePyState_AddModule
, this could be a reason for some of our display bugsEDIT: Oh NVM seems like
PyState_AddModule
gets called implicitly when the module is imported*illume commented at 2022-01-22 20:04:44*
There’s a module clean up PR now… probably to be metered soon… and I wonder if that changes things for this issue. Perhaps display and free type modules are now ok.
*illume commented at 2022-01-22 20:07:06*
There was an update on the pypy issue above about the pystate APIs being added to a pypy milestone. Fingers crossed?
*stuaxo commented at 2022-01-24 21:40:41*
It's been pushed to the next release, but that seems reasonable, I've been keeping up with the updates on this side and the pypy side, let's see how it goes.