-
Notifications
You must be signed in to change notification settings - Fork 41
Formatting Not Working - M1 Macs (darwin/arm64) Unsupported #95
Copy link
Copy link
Open
Description
For M1 Macs, the issue is the new Darwin architecture is missing. The architecture directory on this repository has not been updated in 7 years so I will also include a workaround:
- Run
pip3 install pyastylein your favorite pyenv. I have not confirmed the compatibility between the latest version of pyastyle and the one used in this 7 year old library so YMMV. - Open the plugin's pyastyle directory:
open "~/Library/Application Support/Sublime Text/Packages/SublimeAStyleFormatter/pyastyle/python3" - Create a new directory named
_darwin. - Create an empty
__init__.pyin the new_darwindirectory. - Link or Copy & Rename the darwin binary installed in step 1 to
_darwinwith the namepyastyle.so. If you pip3 installed this globally, this might be located in a path similar to:~/Library/Python/3.8/lib/python/site-packages/pyastyle.cpython-38-darwin.so - Modify
"~/Library/Application Support/Sublime Text/Packages/SublimeAStyleFormatter/pyastyle/python3/__init__.py"to only include the following:try: from ._darwin.pyastyle import * platform = "MacOS X Darwin" except ImportError: raise ImportError("Could not find a suitable pyastyle binary for your platform and architecture.")
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels