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

Not Windows compatible #60

Open
timonsku opened this issue Dec 5, 2024 · 1 comment
Open

Not Windows compatible #60

timonsku opened this issue Dec 5, 2024 · 1 comment

Comments

@timonsku
Copy link

timonsku commented Dec 5, 2024

While compiling works the resulting library seems to either not be a valid Windows shared library or the Python wrapper handles something wrong.
When I try to build the Python wheel I first encounter this issue:
NotImplementedError: Bundling libraries in wheel is not supported on win32

Which is fixed by changing the pyprojects.toml to this suggestion: mesonbuild/meson-python#525 (comment)

This seemingly successfully installs the library but when you then try to use the module in a script it results in the following error on import:
OSError: [WinError 193] %1 is not a valid Win32 application

At first I thought it was getting the wrong path but even after hardcoding the library path it yields the same error.

@asoulier
Copy link
Collaborator

asoulier commented Dec 7, 2024

Hi,

If the meson packaging don't work, you can compile the separately the library and just copy/import the ".py" wrapper.
I think it can also be compiled with MSVC.

There is different calling convention on windows. Perhaps it's the issue.
Can you try try using ctypes.windll, instead of ctype.cdll here

I don't have windows OS to check.
Sorry, I think I can not help more.

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