-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] Cannot build Python wheels for macOS #17468
Comments
@BewareMyPower I'm running the After comment out the old version: diff --git a/pulsar-client-cpp/python/build-mac-wheels.sh b/pulsar-client-cpp/python/build-mac-wheels.sh
index 6a4dae7117..21e37ca887 100755
--- a/pulsar-client-cpp/python/build-mac-wheels.sh
+++ b/pulsar-client-cpp/python/build-mac-wheels.sh
@@ -21,9 +21,9 @@
set -e
PYTHON_VERSIONS=(
- '3.7 3.7.13'
- '3.8 3.8.13'
- '3.9 3.9.10'
+# '3.7 3.7.13'
+# '3.8 3.8.13'
+# '3.9 3.9.10'
'3.10 3.10.2'
) I build You may try to reproduce and I suggest we release more Python client as possible for resolvin #15477 & #16849. Perhaps no supports for old Python versions. |
Confirm that Python support Apple M1 silicon arch from 3.9: https://docs.python.org/3/whatsnew/3.9.html#macos-11-0-big-sur-and-apple-silicon-mac-support |
Thank you @tisonkun, I'm testing it with 3.10 now. |
@tisonkun It still doesn't work.
|
@BewareMyPower can you attach the full log file and tell me what branch you're running against? I can build 2.11.0 pulsar-client on master on macos 12.5 M1 with Python 3.9 & 3.10 & Apple Clang:
|
The error logs are still the same as before. I think it's because some C dependencies must be installed when building Python from source. The script might require users to install some dependencies via For example, the $ find /usr -name "*.h" | grep lzma
find: /usr/sbin/authserver: Permission denied
/usr/local/include/lzma.h
/usr/local/Cellar/xz/5.2.6/include/lzma.h
/usr/local/Cellar/xz/5.2.6/include/lzma/index.h
/usr/local/Cellar/xz/5.2.6/include/lzma/version.h
/usr/local/Cellar/xz/5.2.6/include/lzma/index_hash.h
/usr/local/Cellar/xz/5.2.6/include/lzma/lzma12.h
/usr/local/Cellar/xz/5.2.6/include/lzma/container.h
/usr/local/Cellar/xz/5.2.6/include/lzma/delta.h
/usr/local/Cellar/xz/5.2.6/include/lzma/vli.h
/usr/local/Cellar/xz/5.2.6/include/lzma/check.h
/usr/local/Cellar/xz/5.2.6/include/lzma/bcj.h
/usr/local/Cellar/xz/5.2.6/include/lzma/stream_flags.h
/usr/local/Cellar/xz/5.2.6/include/lzma/block.h
/usr/local/Cellar/xz/5.2.6/include/lzma/hardware.h
/usr/local/Cellar/xz/5.2.6/include/lzma/filter.h
/usr/local/Cellar/xz/5.2.6/include/lzma/base.h
|
The root cause is the |
Same here when I am releasing 2.10.2. |
@Jason918 It's already fixed in latest pulsar-client-python repo. The root cause is when building universal2 Python from source, it relies on the universal binary of zlib. So a universal binary of zlib must be built before building Python. https://github.com/apache/pulsar-client-python/blob/main/pkg/mac/build-dependencies.sh |
@BewareMyPower Great, I will try it on 2.10.2. |
Got error when compiling zlib. See the log: @BewareMyPower Can you help release python mac wheels for release 2.10.2? |
@Jason918 I might not have time recently. The 2.8.4, 2.10.1 released also missed the Python mac wheels. IMO, for macOS users, they should turn to the new repo. |
@BewareMyPower is it fixed now in the separate repo? |
@tisonkun Yes. Close this issue by #17468 (comment) |
Search before asking
Version
Minimal reproduce step
Run the following command.
What did you expect to see?
The Python wheels for macOS should be generated under
pulsar-client-cpp/python/pkg/osx/
directoyr.What did you see instead?
The error logs:
Anything else?
This is a reason that the Python client 2.10.1 for macOS failed to release. @codelipenghui @tisonkun
I didn't look deeper into the script at the moment, but it looks like this script has some requirements for the OS version and Python version because it just builds the specific Python from source code in local env (not docker env). Maybe we need to enhance this script for more systems. /cc @merlimat
Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: