~thrrgilag/pantalaimon-ut

pantalaimon-ut/build-python.sh -rwxr-xr-x 1.4 KiB
cb1aa162Morgan McMillian updated links in README 5 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash

PYTHON_VERSION="3.7.7"
CRYPTOGRAPHY_VERSION="3.2.1"

cd ${BUILD_DIR}

echo
echo "...building python..."
echo
wget -qO- "https://www.python.org/ftp/python/${PYTHON_VERSION}/Python-${PYTHON_VERSION}.tgz" | tar -xz
cd Python-${PYTHON_VERSION}
./configure --prefix="${INSTALL_DIR}" --enable-shared
make
make install
cd ..

export LD_LIBRARY_PATH=${INSTALL_DIR}/lib:${LD_LIBRARY_PATH}

echo
echo "...installing pyinstaller..."
echo
${INSTALL_DIR}/bin/pip3 install --upgrade pyinstaller
# dirty hack to work around pyinstaller locating the bootloader when building for armhf
ln -s ${INSTALL_DIR}/lib/python3.7/site-packages/PyInstaller/bootloader/Linux-32bit-unknown ${INSTALL_DIR}/lib/python3.7/site-packages/PyInstaller/bootloader/Linux-32bit-arm

echo
echo "...installing cryptography..."
echo
export CRYPTOGRAPHY_ALLOW_OPENSSL_102="yes"
${INSTALL_DIR}/bin/pip3 install --upgrade cryptography==${CRYPTOGRAPHY_VERSION}

echo
echo "...installing pantalaimon..."
echo
export LD_LIBRARY_PATH=${ROOT}/build/${ARCH_TRIPLET}/olm/install/lib/${ARCH_TRIPLET}:${LD_LIBRARY_PATH}
export CFLAGS=-I${ROOT}/build/${ARCH_TRIPLET}/olm/install/include
export LDFLAGS=-L${ROOT}/build/${ARCH_TRIPLET}/olm/install/lib/${ARCH_TRIPLET}
${INSTALL_DIR}/bin/pip3 install --upgrade pantalaimon

export PATH=/usr/${ARCH_TRIPLET}/bin:${PATH}
echo
echo "...creating executable..."
echo
${INSTALL_DIR}/bin/pyinstaller --onefile ${INSTALL_DIR}/bin/pantalaimon