Skip to content

Commit 2bb01ab

Browse files
committed
The last build's .app from GitHub's shared runner won't start on my Mac, but when I run the same script on my Mac, it works fine. So I began to diff/merge the two resulting .app dirs and I isolated the issue to be the python binary located in:
helloWorld.app/Contents/Resources/python That's a binary so my ability to diff is limited, but when I execute it, I get this error: bash-3.2$ helloWorld.app/Contents/Resources/python Could not find platform independent libraries <prefix> Could not find platform dependent libraries <exec_prefix> Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] Fatal Python error: initfsencoding: unable to load the file system codec ModuleNotFoundError: No module named 'encodings' Current thread 0x000000010b76bdc0 (most recent call first): Abort trap: 6 bash-3.2$ Compare that to the execution of the binary in the .app generated locally, which works fine bash-3.2$ /Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/python Python 3.7.3 (default, Jun 21 2020, 15:12:57) [Clang 11.0.3 (clang-1103.0.32.62)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> bash-3.2$ I was able to get the python executable distributed by the GitHub's .app dir to load if I specified PYTHONHOME as requested So this could be some issue with setting up the environment varialbe, but I also noticed that the binaries have distinct md5sums. Here's the sum on the working .app dir bash-3.2$ md5 /Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/python MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/python) = 19406f01cd51f5b85689f0d9a25fd71c bash-3.2$ And here's the sum on the broken one given by GitHub: bash-3.2$ md5 helloWorld.app/Contents/Resources/python MD5 (helloWorld.app/Contents/Resources/python) = 7f1bde512187cdf1cf2df1f27026162f bash-3.2$ Note that these are both distinct from my system's python version: bash-3.2$ which python3 /usr/bin/python3 bash-3.2$ md5 /usr/bin/python3 MD5 (/usr/bin/python3) = 285200a03e90d8e012abe6769274dab1 bash-3.2$ However, I found 5x python binaries in the buildozer dir, and they all match the version in my working .app dir bash-3.2$ find /Users/maltfield/sandbox/cross-platform-python-gui/buildozer -type f -name python3 /Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/venv/bin/python3 /Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python3 bash-3.2$ find /Users/maltfield/sandbox/cross-platform-python-gui/buildozer -type f -name python3 -exec '{}' --version \; Python 3.7.3 Python 3.7.3 bash-3.2$ find /Users/maltfield/sandbox/cross-platform-python-gui/buildozer -type f -name python -exec '{}' --version \; Python 3.7.3 Python 3.7.3 Python 3.7.3 bash-3.2$ bash-3.2$ find /Users/maltfield/sandbox/cross-platform-python-gui/buildozer -type f -name python -exec md5 '{}' \; MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/python) = 19406f01cd51f5b85689f0d9a25fd71c MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/venv/bin/python) = 19406f01cd51f5b85689f0d9a25fd71c MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python) = 19406f01cd51f5b85689f0d9a25fd71c bash-3.2$ find /Users/maltfield/sandbox/cross-platform-python-gui/buildozer -type f -name python3 -exec md5 '{}' \; MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Resources/venv/bin/python3) = 19406f01cd51f5b85689f0d9a25fd71c MD5 (/Users/maltfield/sandbox/cross-platform-python-gui/buildozer/dist/helloWorld.app/Contents/Frameworks/python/3.7.3/bin/python3) = 19406f01cd51f5b85689f0d9a25fd71c bash-3.2$ Anyway, this is a dumb termiante-early commit that'll be used to collect info about the python versions available on the GitHub shraed runner. I'm guessing that this might be an issue with the fact that our system's python is 3.7.3 but GitHub's `python3` binary is 3.7.7.
1 parent c6fe8ff commit 2bb01ab

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

build/mac/buildDmg.sh

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,11 @@ APP_NAME='helloWorld'
2525
PYTHON_VERSION="`${PYTHON_PATH} --version | cut -d' ' -f2`"
2626
PYTHON_EXEC_VERSION="`echo ${PYTHON_VERSION} | cut -d. -f1-2`"
2727

28-
###################
29-
# INSTALL DEPENDS #
30-
###################
28+
########
29+
# INFO #
30+
########
3131

32-
# install os-level depends
33-
brew install wget
34-
brew cask install platypus
32+
# print some info for debugging failed builds
3533

3634
uname -a
3735
sw_vers
@@ -43,6 +41,28 @@ echo $PATH
4341
pwd
4442
ls -lah
4543

44+
echo "INFO: list of python* in /usr/bin/"
45+
ls -lah /usr/bin/python*
46+
find /usr/bin -type f -name python -exec '{}' --version \;
47+
find /usr/bin -type f -name python3 -exec '{}' --version \;
48+
md5 /usr/bin/python*
49+
50+
echo "INFO: list of python* in /usr/local/bin/"
51+
ls -lah /usr/local/bin/python*
52+
find /usr/local/bin -type f -name python -exec '{}' --version \;
53+
find /usr/local/bin -type f -name python3 -exec '{}' --version \;
54+
md5 /usr/bin/python*
55+
56+
exit 0
57+
58+
###################
59+
# INSTALL DEPENDS #
60+
###################
61+
62+
# install os-level depends
63+
brew install wget
64+
brew cask install platypus
65+
4666
# first update our PATH so installed depends can be executed
4767
PATH=${PATH}:/Users/runner/Library/Python/${PYTHON_EXEC_VERSION}/bin
4868

0 commit comments

Comments
 (0)