-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #97 from salopensource/apple_silicon
Apple silicon
- Loading branch information
Showing
9 changed files
with
336 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
name: Build Package | ||
# name: Build Package | ||
|
||
on: push | ||
# on: push | ||
|
||
jobs: | ||
build_pkg: | ||
runs-on: macos-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
# - name: Install Luggage | ||
# run: | | ||
# mkdir -p /usr/local/share/luggage | ||
# cp luggage/luggage.make /usr/local/share/luggage/luggage.make | ||
# cp luggage/prototype.plist /usr/local/share/luggage/prototype.plist | ||
- name: make pkg | ||
run: | | ||
sudo make pkg | ||
# jobs: | ||
# build_pkg: | ||
# runs-on: macos-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v1 | ||
# # - name: Install Luggage | ||
# # run: | | ||
# # mkdir -p /usr/local/share/luggage | ||
# # cp luggage/luggage.make /usr/local/share/luggage/luggage.make | ||
# # cp luggage/prototype.plist /usr/local/share/luggage/prototype.plist | ||
# - name: make pkg | ||
# run: | | ||
# sudo make pkg |
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,10 +1,36 @@ | ||
#!/bin/zsh | ||
# Build script for Python 3 framework for Sal scripts | ||
TOOLSDIR=$(dirname "$0") | ||
PYTHON_VERSION=3.8.5 | ||
PYTHON_VERSION=3.9.7 | ||
|
||
# build the framework | ||
/tmp/relocatable-python-git/make_relocatable_python_framework.py \ | ||
--python-version "${PYTHON_VERSION}" \ | ||
--pip-requirements requirements.txt \ | ||
--destination "${TOOLSDIR}" | ||
--destination "${TOOLSDIR}" \ | ||
--os-version "11" \ | ||
--upgrade-pip | ||
|
||
# Stolen with love from https://github.com/macadmins/python/blob/main/build_python_framework_pkgs.zsh | ||
TOTAL_DYLIB=$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.dylib" | /usr/bin/wc -l | /usr/bin/xargs) | ||
UNIVERSAL_DYLIB=$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.dylib" | /usr/bin/xargs file | /usr/bin/grep "2 architectures" | /usr/bin/wc -l | /usr/bin/xargs) | ||
if [ "${TOTAL_DYLIB}" != "${UNIVERSAL_DYLIB}" ] ; then | ||
echo "Dynamic Libraries do not match, resulting in a non-universal Python framework." | ||
echo "Total Dynamic Libraries found: ${TOTAL_DYLIB}" | ||
echo "Universal Dynamic Libraries found: ${UNIVERSAL_DYLIB}" | ||
exit 1 | ||
fi | ||
|
||
echo "Dynamic Libraries are confirmed as universal" | ||
|
||
TOTAL_SO=$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.so" | /usr/bin/wc -l | /usr/bin/xargs) | ||
UNIVERSAL_SO=$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.so" | /usr/bin/xargs file | /usr/bin/grep "2 architectures" | /usr/bin/wc -l | /usr/bin/xargs) | ||
if [ "${TOTAL_SO}" != "${UNIVERSAL_SO}" ] ; then | ||
echo "Shared objects do not match, resulting in a non-universal Python framework." | ||
echo "Total shared objects found: ${TOTAL_SO}" | ||
echo "Universal shared objects found: ${UNIVERSAL_SO}" | ||
UNIVERSAL_SO_ARRAY=("${(@f)$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.so" | /usr/bin/xargs file | /usr/bin/grep "2 architectures" | awk '{print $1;}' | sed 's/:*$//g')}") | ||
TOTAL_SO_ARRAY=("${(@f)$(/usr/bin/find "${TOOLSDIR}/Python.framework/Versions/Current/lib" -name "*.so" )}") | ||
echo ${TOTAL_SO_ARRAY[@]} ${UNIVERSAL_SO_ARRAY[@]} | tr ' ' '\n' | sort | uniq -u | ||
exit 1 | ||
fi |
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,5 +1,7 @@ | ||
sal_python_pkg/ | ||
pyobjc==6.2.2 | ||
urllib3==1.25.10 | ||
requests==2.24.0 | ||
pyobjc==7.2 | ||
#urllib3==1.26.5 | ||
requests==2.26.0 | ||
MacSesh==0.3.0 | ||
six==1.16.0 | ||
--no-binary :all: |
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 +1 @@ | ||
__version__ = "4.1.1" | ||
__version__ = "4.2.0" |
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
Oops, something went wrong.