-
I have been building universal2 builds for over a year using the method @jondy and I talked about in the following thread. Due to deprecations and changes in recent versions of Pyarmor I am unable to create universal2 builds the way I did previously. It would appear that targeting #!/bin/zsh
#set -e
rm -rf ./build ./dist ./.pyarmor ./test.spec ~/pyarmortesting
cwd=$(pwd)
python3 -m venv ~/pyarmortesting/
cd ~/pyarmortesting/
source ./bin/activate
cd $cwd
pip install pyarmor==8.5.11 pyinstaller==6.9.0 pyarmor.cli.core.darwin==6.5.3
pwd
# The following works
pyi-makespec --name test --target-architecture arm64 --windowed --onefile ./src/test.py
pyinstaller test.spec
pyarmor -d gen --pack test.spec --platform darwin.arm64 -r ./src/test.py
./dist/test
python3 --version
# The following does not work
pyi-makespec --name test --target-architecture universal2 --windowed --onefile ./src/test.py
pyinstaller test.spec
pyarmor -d gen --pack test.spec --platform darwin.x86_64 --platform darwin.arm64 -r ./src/test.py
./dist/test
python3 --version The error message I get is the following.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
This error means you need generate universal binary by `pyarmor gen --platform darwin.arm64,darwin.x86_64 ...' |
Beta Was this translation helpful? Give feedback.
-
Try to apply this patch diff --git a/pyarmor/cli/__main__.py b/pyarmor/cli/__main__.py
index 103f86f3..e282432d 100644
--- a/pyarmor/cli/__main__.py
+++ b/pyarmor/cli/__main__.py
@@ -238,8 +238,8 @@ def cmd_gen(ctx, args):
packer = Repacker(ctx, args.pack, options['inputs'], args.output)
packer.check()
builder.process(options, packer=packer)
- packer.build()
Plugin.post_build(ctx, pack=args.pack)
+ packer.build()
else:
builder.process(options)
Plugin.post_build(ctx) |
Beta Was this translation helpful? Give feedback.
Try to apply this patch