Is it possible to build PySide2 for M1 (arm64)?
-
I’m trying to build my project dependencies for native Apple Silicon support. However, I’m having issues compiling PySide2. I know… I know… it’s too old and it’s better to use PySide6. We want to upgrade that too. But my point is to know if I can do the arm64 support first.
To build PySide2 I’m using:
- macOS 12.6
- XCode 14
- I compiled Python 3.9 with no issues.
- QT 5.15.10
- libclang 12
- pyside-setup (source code) 5.15.2.1
My error message when I try to build PySide2 with python setup.py install --qmake=... is:
Something's broken. UCHAR_MAX should be defined in limits.h.
I realized that since QT 5.15.4 I can use the option QMAKE_APPLE_DEVICE_ARCHS="x86_64 arm64" but I’m not sure how to pass it to pyside-setup.
I have a couple of questions:
- Is it possible to compile PySide2 (QT5) for arm?
- How can I build PySide2 locally without a Qt license just for development purposes? I have my file only on CI and when I try locally I get:
Error: Qt license file was not found! Project ERROR: License check failed! Giving up ... error: Failed to query for Qt's QMAKE_MACOSX_DEPLOYMENT_TARGET.
-
@carlos-villavicencio hi, did you find solution? Also how did you build pyside2 from source?