From be7e59e0fefd9d7219a425846e6a124970da1773 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 6 Sep 2021 14:44:30 -0700 Subject: [PATCH] pyinstaller hack for armhf and remote patch --- dev-build.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/dev-build.sh b/dev-build.sh index 824a504..0642c86 100755 --- a/dev-build.sh +++ b/dev-build.sh @@ -82,9 +82,14 @@ ${PIP} install --upgrade wheel echo "Installing 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..." -CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes" ${PIP} install cryptography +export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes" +${PIP} install cryptography==3.2.1 echo "Installing pycairo..." ${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..." cd ${PROJECT_DIR} 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/panctl