Skip to content

Commit

Permalink
Enforce universal2 Python
Browse files Browse the repository at this point in the history
  • Loading branch information
spotlightishere committed May 17, 2024
1 parent 6f1b13c commit 2722564
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions scripts/macos-universal2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ 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
Expand Down
8 changes: 8 additions & 0 deletions scripts/macos-universal2/prep-PyQt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -e
# Provided by @spotlightishere on Github
# https://github.com/MCMi460/NSO-RPC/pull/86#issuecomment-1605700512

# 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

# If we already have a universal2 wheel available, install and process no further.
# https://stackoverflow.com/a/6364244
if compgen -G "./PyQt6_*universal2.whl"; then
Expand Down

0 comments on commit 2722564

Please sign in to comment.