scoder / lupa

Lua in Python
http://pypi.python.org/pypi/lupa
Other
1.01k stars 134 forks source link

macOS M1 wheels missing #191

Open codeskyblue opened 3 years ago

codeskyblue commented 3 years ago

MacOS Big Sur 11.4 (Apple M1)

lupa version 1.9

$ pip3 show lupa
Name: lupa
Version: 1.9
Summary: Python wrapper around Lua and LuaJIT
Home-page: https://github.com/scoder/lupa
Author: Stefan Behnel
Author-email: stefan_ml@behnel.de
License: MIT style
Location: /opt/homebrew/lib/python3.9/site-packages
Requires: 
Required-by:

error output

$ python3
Python 3.9.5 (default, May  3 2021, 19:12:05) 
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import lupa
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/homebrew/lib/python3.9/site-packages/lupa/__init__.py", line 32, in <module>
    from lupa._lupa import *
ImportError: dlopen(/opt/homebrew/lib/python3.9/site-packages/lupa/_lupa.cpython-39-darwin.so, 2): Symbol not found: _lua_newuserdata
  Referenced from: /opt/homebrew/lib/python3.9/site-packages/lupa/_lupa.cpython-39-darwin.so
  Expected in: flat namespace
 in /opt/homebrew/lib/python3.9/site-packages/lupa/_lupa.cpython-39-darwin.so
chicogamedev commented 2 years ago

I have this error too on a mac Intel.

Any advice ?

scoder commented 2 years ago

There is currently no wheel for M1, because the current build process does not build wheels for M1. I'm also not a mac user myself, so PR welcome.

yawhide commented 2 years ago

@scoder noticed on https://github.com/scoder/lupa/blob/master/.github/workflows/wheels.yml#L124 that that macos stuff have v10 and v11. The latest macos version is 12. would adding wheels be as easy as updating those versions to 12?

yawhide commented 2 years ago

apparently we can run macos 12 runners on github for free https://github.blog/changelog/2022-06-13-github-actions-macos-12-for-github-hosted-runners-is-now-generally-available/

is this something* you can add to the wheels.yml to make building on macos 12 m1s?

scoder commented 2 years ago

Tried switching to macos-12, doesn't help.

If someone who is interested in getting this to work could try out how to make it work, I'd be happy to accept a working, maintainable solution as a PR. I'm personally not interested in investing more time than that into this problem.

Note that one possible solution might be to switch to cibuildwheel. They seem to have added support for M1 macs.

yawhide commented 2 years ago

@scoder I see a success for python 3.9/3.10 on macos

https://github.com/scoder/lupa/runs/7712695227?check_suite_focus=true

https://github.com/scoder/lupa/runs/7712695185?check_suite_focus=true

what makes you say your PR didn't work?

scoder commented 2 years ago

what makes you say your PR didn't work?

The wheels are called x86_64 and have the size of a normal, regular, one-platform wheel.