-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Merge universal2 debloat script into prep This additionally skips building the wheel if it has already been built (e.g. for rapid development). * Enforce x86_64 for build environment This ensures that x86_64 is leveraged for our pure x86_64 builds even on arm64 runners. * Ensure setup.py is removed when building * Resolve test invocation issues * Leverage open for test invocation * Enforce x86_64 Python for x86_64-only build * Enforce universal2 Python
- Loading branch information
1 parent
6909643
commit 149d240
Showing
6 changed files
with
124 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,40 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Run everything relative to our script directory. | ||
cd "$(dirname "$0")" | ||
|
||
# Within GitHub Actions and similar, we should use the Python.org | ||
# copy of Python 3.11 available. This permits a universal2 framework for py2app. | ||
# (Otherwise, GitHub's default runners include a single architecture version.) | ||
if [[ "$CI" == "true" ]]; then | ||
shopt -s expand_aliases | ||
alias python3=/Library/Frameworks/Python.framework/Versions/3.11/bin/python3.11 | ||
fi | ||
|
||
# Activate a virtual environment so we don't pollute the system environment. | ||
python3 -m venv --upgrade-deps venv | ||
source venv/bin/activate | ||
python3 -m pip install wheel PyQt6 | ||
python3 -m pip install wheel | ||
|
||
# Before we install anything further, create our custom universal2 version of | ||
# the PyQt6 frameworks (PyQt6_Qt6), and then install PyQt6 itself. | ||
bash prep-PyQt.sh | ||
python3 -m pip install PyQt6 | ||
|
||
# Lastly, build our client. | ||
cd ../../client | ||
python3 -m pip install -r requirements.txt py2app GitPython | ||
python3 _version.py | ||
rm setup.py | ||
|
||
# Recreate our setup.py with macOS-specific options. | ||
if [ -f setup.py ]; then | ||
rm setup.py | ||
fi | ||
py2applet --make-setup app.py icon.icns "icon.png" "taskbarDark.png" "taskbarLight.png" "version.txt" | ||
# build universal binary | ||
sed -i '' -e "s/)/ name='NSO-RPC')/" setup.py | ||
python3 setup.py py2app -O2 --arch=universal2 | ||
python3 ../scripts/macos-universal2/debloat-qt.py | ||
# arm64 requires codesigning to run | ||
codesign --deep --force --sign - dist/NSO-RPC.app/Contents/MacOS/* | ||
open dist |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters