Skip to content

Commit 1bfd3eb

Browse files
Apple silicon (aws#9649)
* Universal Mac build
1 parent 2de5f9f commit 1bfd3eb

File tree

4 files changed

+15
-2
lines changed

4 files changed

+15
-2
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "feature",
3+
"category": "installer",
4+
"description": "Added universal binary support for AWS CLI v2 on macOS"
5+
}

exe/pyinstaller/aws.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- mode: python -*-
22
import platform
3+
import os
34

45
block_cipher = None
56
exe_name = 'aws'
@@ -53,7 +54,8 @@ aws_exe = EXE(aws_pyz,
5354
strip=False,
5455
upx=True,
5556
console=True,
56-
contents_directory='.')
57+
contents_directory='.',
58+
target_arch='universal2' if os.environ.get('BUILD_UNIVERSAL_BINARY') == '1' else None,)
5759
coll = COLLECT(aws_exe,
5860
aws_a.binaries,
5961
aws_a.zipfiles,

exe/pyinstaller/aws_completer.spec

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- mode: python -*-
22
import platform
3+
import os
34

45
block_cipher = None
56
exe_name = "aws_completer"
@@ -54,7 +55,8 @@ completer_exe = EXE(completer_pyz,
5455
strip=False,
5556
upx=True,
5657
console=True,
57-
contents_directory='.')
58+
contents_directory='.',
59+
target_arch='universal2' if os.environ.get('BUILD_UNIVERSAL_BINARY') == '1' else None,)
5860
coll = COLLECT(completer_exe,
5961
completer_a.binaries,
6062
completer_a.zipfiles,

tox.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ install_command =
1515
python -m pip install --no-build-isolation {opts} {packages}
1616
deps =
1717
-r{toxinidir}/requirements-build-lock.txt
18+
passenv =
19+
BUILD_UNIVERSAL_BINARY
1820
commands =
1921
{envpython} {toxinidir}/scripts/installers/make-exe {posargs}
2022

@@ -25,6 +27,8 @@ install_command =
2527
python -m pip install --no-build-isolation {opts} {packages}
2628
deps =
2729
{[testenv:exe]deps}
30+
passenv =
31+
BUILD_UNIVERSAL_BINARY
2832
commands =
2933
{envpython} {toxinidir}/scripts/installers/make-macpkg {posargs}
3034

0 commit comments

Comments
 (0)