python-greenlet / greenlet

Lightweight in-process concurrent programming
Other
1.64k stars 247 forks source link

please provide wheels for Apple Silicon #350

Closed sg-s closed 1 year ago

sg-s commented 1 year ago

i can help with this if you want.

right now other things depend on greenlet, which are broken because there are no wheels for my arch. i've had to download this repo and build the wheel myself and use that.

Timopheym commented 1 year ago

Could you please provide it somewhere please? It's not easy to build it each time as I don't have proper dev. environment with python.h for that... thanks!

sg-s commented 1 year ago

i built this using

pip wheel .

and got this:

Processing /Users/srinivas/code/greenlet
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: greenlet
  Building wheel for greenlet (setup.py) ... done
  Created wheel for greenlet: filename=greenlet-2.0.3.dev0-cp39-cp39-macosx_10_9_x86_64.whl size=191729 sha256=7513e3acfc1eac97c9e81e6c8408758c07884f1da0ef1e26e352014b0388c6d8
  Stored in directory: /private/var/folders/jp/1qwrgr7n1595mthn9bbvvkjc0000gn/T/pip-ephem-wheel-cache-wfli6v_s/wheels/f2/c9/f6/ac91b186a7c637b951c8938c515f69aab53e8ee7019a1324bc
Successfully built greenlet

looks like everything worked?

greenlet-2.0.3.dev0-cp39-cp39-macosx_10_9_x86_64.whl.zip

sg-s commented 1 year ago

can't we use a github action with a runner on apple silicon to automate the build?

https://github.com/github/roadmap/issues/528

yaleman commented 1 year ago

Just in case anyone comes here looking for help with 2.0.1 and Ventura throwing all sorts of horrible compilation issue, 2.0.2 fixed it for me.

zzzeek commented 1 year ago

Hi -

I see the issue is marked completed, are there Apple M1 wheels published now? I dont see anything at https://pypi.org/project/greenlet/#files , were there changes to build infrastructure that have yet to take place on pypi ?

jamadden commented 1 year ago

There have been M1 wheels since January (2.0.2 and 3.0). E.g., greenlet-2.0.2-cp311-cp311-macosx_10_9_universal2.whl

jamadden commented 1 year ago

I wasn't as successful getting wheels published for 2.0 so they may not be there for the full matrix, but they should be for 3.0.

zzzeek commented 1 year ago

Ok which files at https://pypi.org/project/greenlet/#files are that ? We've had huge notes etc on our docs about apple M1 not being available without build tools etc and that would all have to change. I don't see which files there would be the ones but then I don't know what a wheel for M1 looks like. cc @CaselIT

zzzeek commented 1 year ago

It looks like 3.0.0a1 has macos-arm64 files which id assume are the files. Current released 2.0.2 does not have them

jamadden commented 1 year ago

universal2 is the wheel tag for Mac wheels with both x86_64 and arm code, like the one I linked to for 2.0.2.

jamadden commented 1 year ago

Unfortunately, getting universal2 wheels to build reliably has been problematic on some versions of Python+tooling, hence the sometimes separate arm and x86 wheels. What's even weirder is that some of the wheels tagged x86_64 are, in fact, really universal2 and contain both architectures.

CaselIT commented 1 year ago

@zzzeek I guess the big note on top here https://docs.sqlalchemy.org/en/20/orm/extensions/asyncio.html can be removed

jamadden commented 1 year ago

(I've filled in the matrix for 2.0.2 with specific arm64 wheels to eliminate confusion. I think I've worked out how to only get universal2 wheels going forward.)

CaselIT commented 1 year ago

if you are using cibuildwheel it seems to create two wheels, at least when configured using

[tool.cibuildwheel.macos]
archs = ["x86_64", "arm64"]

don't know if they support universal. I also don't know if there is any advantage in having one file instead of two