pyinstaller hack for armhf and remote patch

This commit is contained in:
Morgan McMillian 2021-09-06 14:44:30 -07:00
parent a602478ccb
commit be7e59e0fe

View file

@ -82,9 +82,14 @@ ${PIP} install --upgrade wheel
echo "Installing PyInstaller..." echo "Installing PyInstaller..."
${PIP} install --upgrade pyinstaller ${PIP} install --upgrade pyinstaller
# dirty hack to work around pyinstaller locating the bootloader when building for armhf
ln -s ${PYTHON_DIR}/lib/python3.7/site-packages/PyInstaller/bootloader/Linux-32bit-unknown ${PYTHON_DIR}/lib/python3.7/site-packages/PyInstaller/bootloader/Linux-32bit-arm
# NOTE: Newer versions of cryptography require rustc+cargo to build. While the
# new version builds fine with rust on arm64 it fails on armhf
echo "Installing cryptography..." echo "Installing cryptography..."
CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes" ${PIP} install cryptography export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes"
${PIP} install cryptography==3.2.1
echo "Installing pycairo..." echo "Installing pycairo..."
${PIP} install pycairo==1.19.1 ${PIP} install pycairo==1.19.1
@ -98,7 +103,7 @@ CFLAGS=-I${OLM_DIR}/usr/local/include LDFLAGS=-L${OLM_DIR}/usr/local/lib ${PIP}
echo "Bundling Pantalaimon..." echo "Bundling Pantalaimon..."
cd ${PROJECT_DIR} cd ${PROJECT_DIR}
echo "${PANTALAIMON_PATCH_CONTENT}" > main.patch echo "${PANTALAIMON_PATCH_CONTENT}" > main.patch
patch ${PYTHON_DIR}/lib/python${PYTHON_VERSION_MINOR}/site-packages/pantalaimon/main.py main.patch # patch ${PYTHON_DIR}/lib/python${PYTHON_VERSION_MINOR}/site-packages/pantalaimon/main.py main.patch
${PYTHON_DIR}/bin/pyinstaller --onefile ${PYTHON_DIR}/bin/pantalaimon ${PYTHON_DIR}/bin/pyinstaller --onefile ${PYTHON_DIR}/bin/pantalaimon
${PYTHON_DIR}/bin/pyinstaller --onefile ${PYTHON_DIR}/bin/panctl ${PYTHON_DIR}/bin/pyinstaller --onefile ${PYTHON_DIR}/bin/panctl