blake3-py icon indicating copy to clipboard operation
blake3-py copied to clipboard

Wheels for Python 3.11 and PyPy

Open HacKanCuBa opened this issue 3 years ago • 5 comments

It would be nice to have wheels for Python 3.11 and PyPy (3.7 and 3.8), so as to not need cargo when installing blake3 in such environments.

This is a mere request, not a demand nor anything. Thanks for the good work here!.

HacKanCuBa avatar Dec 30 '21 03:12 HacKanCuBa

Similar issue: https://github.com/oconnor663/blake3-py/issues/28

I currently use GitHub Actions to build all the wheels. If there's an easy way to get Actions (and particularly the actions/setup-python@v2 helper that we use here) to install these versions of Python, I'd be happy to add that. According to these docs there might be:

https://github.com/actions/setup-python#available-versions-of-python https://github.com/actions/setup-python#available-versions-of-pypy

That said, if we add something like 3.11.0-alpha.3, we might want to think a bit about what our update policy is. As new alphas come out, do we expect to add them to the build "whenever"? Or is there some way to automate this? Maybe check for new Python versions persistently, like once a day, rather than tying them exclusively to versions bumps of this library? Not sure what's the most reasonable solution here.

oconnor663 avatar Jan 10 '22 18:01 oconnor663

"I want to build this and upload it to PyPI for every minor CPython and PyPy version" must be something that tons of projects have to automate. How do other projects do this? Everything in this project is bespoke, which means I'm almost certainly missing something easier.

oconnor663 avatar Jan 10 '22 18:01 oconnor663

True, I've honestly been only building wheels for linux, but most of my projects have no building deps so it doesn't make much of difference (which is why I haven't tried anything else yet). Gonna give you a hand later today

HacKanCuBa avatar Jan 10 '22 18:01 HacKanCuBa

How do other projects do this?

cibuildwheel is becoming pretty standard as a way to build wheels for lots of platforms. You can see pyzmq as an example that builds wheels including a bundled (C++) library dependency, covering pypy, arm, windows, etc.

minrk avatar Jul 26 '22 04:07 minrk

How do other projects do this?

cibuildwheel is becoming pretty standard as a way to build wheels for lots of platforms. You can see pyzmq as an example that builds wheels including a bundled (C++) library dependency, covering pypy, arm, windows, etc.

this looks super awesome, thanks for sharing!

HacKanCuBa avatar Jul 29 '22 14:07 HacKanCuBa

Python 3.11 has been released, so it might be time to make a new release of blake3 https://discuss.python.org/t/python-3-11-0-final-is-now-available/20291

Pilen avatar Oct 25 '22 14:10 Pilen

Yep! The next step is getting this PR to pass CI: https://github.com/oconnor663/blake3-py/pull/37. Looks like we're still waiting for 3.11 to land for GitHub Actions macOS? https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json

oconnor663 avatar Oct 26 '22 02:10 oconnor663

ugh, yeah, seems like 3.11 isn't in macOS yet, but should be soon, i hope 🙏

HacKanCuBa avatar Oct 26 '22 18:10 HacKanCuBa

Wheels for 3.11 are now up.

oconnor663 avatar Oct 31 '22 07:10 oconnor663

Wheels for 3.11 are now up.

I don't see them in the latest release :P Do you have to make a new release or can u manually push them?

HacKanCuBa avatar Oct 31 '22 14:10 HacKanCuBa

Oh my bad, the binaries made it to GitHub but not PyPI. Let me kick it again...

oconnor663 avatar Oct 31 '22 15:10 oconnor663

Ok try now.

oconnor663 avatar Oct 31 '22 15:10 oconnor663

hahaha awesome! I just tried in a mac and i got the wheel, and i can clearly see the rest of the wheels, so i'm closing this as fixed.

thanks so much!

HacKanCuBa avatar Oct 31 '22 16:10 HacKanCuBa

I guess the question of Pypy binaries is still open? But I kind of imagine anyone going out of their way to run Pypy can probably also install a Rust toolchain and let Pip build from source?

oconnor663 avatar Oct 31 '22 16:10 oconnor663

I guess the question of Pypy binaries is still open? But I kind of imagine anyone going out of their way to run Pypy can probably also install a Rust toolchain and let Pip build from source?

You are correct, we are still missing the PyPy part :P and of course, anyone using it will know what to do regarding rust toolchain, but the same goes for CPython users. If you are planning to add PyPy as supported (meaning tests for it, i guess), and/or add it to the build chain, then i can reopen this issue (or better yet, create a new, specific one)

HacKanCuBa avatar Oct 31 '22 17:10 HacKanCuBa