-
Notifications
You must be signed in to change notification settings - Fork 10
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
build for universal2, not separate arm64/x64 #5
Conversation
Applications that might want to bundle appscript will almost certainly want to be multi-architecture as we are mid-transition to apple silicon; building separate wheels creates artifacts that are architecture-specific and thus will not work in a universal2 application.
@glyph can't we just add universal wheels instead of replacing them? From what I understand, it's only really a thing for building apps (as you do), pip will always prefer the platform-specific build. |
The particular context where I'm experiencing the error right now is not actually an app build: there are a number of contexts where one might have one venv for multiple architectures. Consider an app that is mostly AS native, but has a component that needs to be run as a subprocess to load a legacy x86_64 module. Why would you want to ship architecture-specific wheels, though? With universal2, at the cost of a tiny amount of additional disk space, you avoid a whole slew of compatibility problems where the module won't load. Also, app builds are generally built out of venvs installed with |
As pypa/cibuildwheel#1333 shows, there are contracting opinions out there. I stuck to the recommendation on cibuildwheel docs:
Also, I was looking at how other projects handle it. Popular ones like Anyhow, for appscript, bundle is size is a no-issue as they are super small, but I'd still go with both |
This is interesting. To make this recommendation I looked at my local cache, which has a ton of |
I've added x86_64 back to the arch list in the PR just to make this easier :) |
thanks! |
Thank you for keeping this super handy package alive and maintained! |
All credit goes to @hhas |
Applications that might want to bundle appscript will almost certainly want to be multi-architecture as we are mid-transition to apple silicon; building separate wheels creates artifacts that are architecture-specific and thus will not work in a universal2 application.
I discovered this because I created a virtualenv at the command line, then used
nteract
(sadly still an x86_64 legacy application) which could not import the newappscript
wheels from its kernel.