Skip to content
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

Possible MinGW support (needs a bit of help) #566

Open
JojoFR1 opened this issue Sep 28, 2024 · 6 comments
Open

Possible MinGW support (needs a bit of help) #566

JojoFR1 opened this issue Sep 28, 2024 · 6 comments

Comments

@JojoFR1
Copy link

JojoFR1 commented Sep 28, 2024

Hi, I started to make this library into a MSYS2 MINGW64 package but ran into multiple issues and I would like to know if you could guide me to fix those. (I already spent 6 hours on this... I do not want to abandon)

Firstly everything is compiled and packaged fine (even though I had to patch a file because SDL2-static didn't exist and it was simply SDL2) but when installing the package and importing pyxel I only have pyxel.pyxel_wrapper available and nothing else.
I also tried directly installing the wheel, which didn't work, pip telling me my system didn't support the wheel (maybe something to fo with MSYS environment)
And the last issue is with pyxel.exe which simply doesn't work, giving this error: Fatal error in launcher: Unable to find an appended archive.

I do not ask for you to directly help me (and you might not have the time to) but more to guide me and fix those problems.

@JojoFR1
Copy link
Author

JojoFR1 commented Sep 29, 2024

Some update about this, after some more research the wheel doesn't contains the python folder contents (except for the pyxel-wrapper.pyd file), thus why it can't find any methods/class but I do not know how to add them.
Another issue is that the wheel is for win-amd64 while I need it to be mingw_x86_64 and, again, I do not know how to change that. (It might not be relevant, installing through pip is not possible but using te pacman package manager it works)

@JojoFR1
Copy link
Author

JojoFR1 commented Sep 30, 2024

Another update, yet again, but it actually works.

I do have to import pyxel.pyxel_wrapper for it to work tho, as import pyxel doesn't work.
The only issue then is the missing python folder which contains the __init__.py, the .pyi, etc...

If you have any clue as to why I would appreciate. Don't hesitate to ask me any missing information, I'll answer as quickly as possible.

@JojoFR1 JojoFR1 changed the title Question about MinGW support Possible MinGW support (needs a bit of help) Sep 30, 2024
@kitao
Copy link
Owner

kitao commented Oct 1, 2024

Hi.
When I tried MSYS2 environment before, I stopped it because it seems that MSYS2 env doesn't support Python ABI and maintaining new develop environment costs high regardless of MSYS2 supports Python ABI or not.

Can I ask what is your motivation?

@JojoFR1
Copy link
Author

JojoFR1 commented Oct 1, 2024

Hi, thank you for the reply.

I do not know about ABI support, but since it successfully compiled Rust and made the wheel (which half work, as in it does technically work but it's missing all the python folder which is important for IDE suggestions, etc...) ABI might be now supported?
As for my motive I just wanted to make this library a MSYS MinGW package so it's supported in that environment, and potentially, once this work, make a PR here to possibly fix the issues.

@kitao
Copy link
Owner

kitao commented Oct 1, 2024

Sorry I should write "Stable ABI" (PEP384).

If MSYS2 doesn't support it yet, Pyxel doesn't have binary compatibility and only works on the same Python version it was compiled with. And it also may be possible that an external Stable-ABI-compatible module cannot be used with the MSYS2 version of Pyxel.

A several years ago, I learned about that and decided to stop using MSYS2 to create binaries for Windows. But I haven't kept up with the latest situation on this topic.

@JojoFR1
Copy link
Author

JojoFR1 commented Oct 1, 2024

About the Stable ABI, I found those:

msys2-contrib/cpython-mingw#148
msys2/MINGW-packages#18238

Which visibly seems to add it. I understand if you do not want to waste your time doing that, I personally do not mind doing it but I just need to iron out those last few issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants