forked from SynoCommunity/spksrc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathservice-setup.sh
20 lines (16 loc) · 874 Bytes
/
service-setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
PATH="${SYNOPKG_PKGDEST}/bin:$PATH"
service_postinst ()
{
# Install the wheels
${SYNOPKG_PKGDEST}/bin/pip install --no-deps --no-index -U --force-reinstall -f ${SYNOPKG_PKGDEST}/share/wheelhouse ${SYNOPKG_PKGDEST}/share/wheelhouse/*.whl >> ${INST_LOG} 2>&1
# Log installation informations
${SYNOPKG_PKGDEST}/bin/python3 --version >> ${INST_LOG} 2>&1
echo -e "\nSystem installed modules:" >> ${INST_LOG}
${SYNOPKG_PKGDEST}/bin/pip freeze >> ${INST_LOG}
# Install busybox stuff
# So pure-Python spk's can use the functions
${SYNOPKG_PKGDEST}/bin/busybox --install ${SYNOPKG_PKGDEST}/bin
# Byte-compile in background
${SYNOPKG_PKGDEST}/bin/python3 -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python3.3 >> ${INST_LOG} &
${SYNOPKG_PKGDEST}/bin/python3 -OO -m compileall -q -f ${SYNOPKG_PKGDEST}/lib/python3.3 >> ${INST_LOG} &
}