OpenCC
OpenCC copied to clipboard
Support building the Python package for Apple M1 (arm64)
@mingruimingrui
The current 'release-pypi-macos.sh' only builds for x86_64 for Mac.
It would be better if we can have *_arm64.whl, too.
Let me take a look! There's a few things we need...
- pybind11 compatibility
- A way to compile for arm with github workflow
Will update when I got the answer
any updates on this? @mingruimingrui
我開發了 OpenCC 的下一代簡繁轉換工具:StarCC
https://github.com/StarCC0/starcc-py
I've compiled opencc via my m1 mac, which may help before the work find a way integrate into release pipeline or github workflow. https://github.com/p208p2002/OpenCC/releases/tag/v1.1.4
@p208p2002 What can I do to fix this issue? Should I publish a new release?
@ayaka14732 I think we should keep this issue open and do nothing, before find a stable way to build and compile macos-arm package via github workflow or other CI-system.
In my understanding github's macos runner currently is not support arm64, but in progress
https://github.com/actions/runner-images/issues/2187 https://github.com/github/roadmap/issues/528
I'm trying self-hosted runner or cross compile (maybe QEMU? i have a little experience on it) which may compatible with current opencc project setting to compile arm64 package via github's x86 machine. maybe i could push a PR after that work :D
@p208p2002 thank you for providing a build from M1. What's the easiest way to use that build? The following didn't work.
npm install [email protected]:p208p2002/OpenCC.git#v1.1.4
@lannka It's a python package, you should download the .whl
file then install via pip
instead npm
@p208p2002 thank you for the prompt response. Unfortunately as NPM user I kinda stuck here as I don't have too much python experience. Extra tips are appreciated.
Given that it takes years for GitHub action to provide such a M1 environment, may I suggest a manual push of a M1 binary? So that NPM users can move smoothly from a Intel machine to a M1 machine without interruption.
I understand automating this can be the eventual goal, but given the project hasn't been updated that frequently, a manual release seems worth the effort and can benefit thousands of developers?
Thank you folks again for maintaining such a great project.