~thrrgilag/pantalaimon-ut

be7e59e0fefd9d7219a425846e6a124970da1773 — Morgan McMillian 1 year, 2 months ago a602478
pyinstaller hack for armhf and remote patch
1 files changed, 7 insertions(+), 2 deletions(-)

M dev-build.sh
M dev-build.sh => dev-build.sh +7 -2
@@ 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