File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build ARM64 Python on macOS
2
+
3
+ on : [push, pull_request]
4
+
5
+ jobs :
6
+ build :
7
+ runs-on : macos-latest
8
+ steps :
9
+ - name : Set up Rosetta 2
10
+ run : |
11
+ softwareupdate --install-rosetta --agree-to-license || true
12
+
13
+ - name : Download Python 3.11.8 Source
14
+ run : |
15
+ curl -O https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz
16
+ tar -xf Python-3.11.8.tgz
17
+ cd Python-3.11.8
18
+
19
+ - name : Build Python 3.11.8 for ARM64
20
+ run : |
21
+ cd Python-3.11.8
22
+ arch -arm64 ./configure --prefix=$HOME/python-arm64 --enable-optimizations
23
+ arch -arm64 make -j$(sysctl -n hw.ncpu)
24
+ arch -arm64 make install
25
+
26
+ - name : Verify Build
27
+ run : |
28
+ $HOME/python-arm64/bin/python3 --version
29
+ $HOME/python-arm64/bin/python3 -c "import platform; print(platform.architecture())"
You can’t perform that action at this time.
0 commit comments