mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
packages: use Python helper functions
This commit is contained in:
parent
fcfee6ff42
commit
1b58564ead
@ -128,8 +128,7 @@ post_makeinstall_target() {
|
|||||||
rm -rf $INSTALL/usr/bin/python*-config
|
rm -rf $INSTALL/usr/bin/python*-config
|
||||||
rm -rf $INSTALL/usr/bin/smtpd.py $INSTALL/usr/bin/smtpd.py.*
|
rm -rf $INSTALL/usr/bin/smtpd.py $INSTALL/usr/bin/smtpd.py.*
|
||||||
|
|
||||||
$TOOLCHAIN/bin/python3 -Wi -t -B $TOOLCHAIN/lib/$PKG_PYTHON_VERSION/compileall.py -d ${PKG_INSTALL_PATH_LIB#${INSTALL}} -b -f $PKG_INSTALL_PATH_LIB
|
python_compile $PKG_INSTALL_PATH_LIB
|
||||||
find $PKG_INSTALL_PATH_LIB -name "*.py" -exec rm -f {} \; &>/dev/null
|
|
||||||
|
|
||||||
# strip
|
# strip
|
||||||
chmod u+w $INSTALL/usr/lib/libpython*.so.*
|
chmod u+w $INSTALL/usr/lib/libpython*.so.*
|
||||||
|
@ -25,11 +25,9 @@ post_makeinstall_target() {
|
|||||||
|
|
||||||
ADDON_INSTALL_DIR=$INSTALL/usr/share/kodi/addons/service.libreelec.settings
|
ADDON_INSTALL_DIR=$INSTALL/usr/share/kodi/addons/service.libreelec.settings
|
||||||
|
|
||||||
$TOOLCHAIN/bin/python -Wi -t -B $TOOLCHAIN/lib/$PKG_PYTHON_VERSION/compileall.py $ADDON_INSTALL_DIR/resources/lib/ -f
|
python_compile $ADDON_INSTALL_DIR/resources/lib/
|
||||||
rm -rf $(find $ADDON_INSTALL_DIR/resources/lib/ -name "*.py")
|
|
||||||
|
|
||||||
$TOOLCHAIN/bin/python -Wi -t -B $TOOLCHAIN/lib/$PKG_PYTHON_VERSION/compileall.py $ADDON_INSTALL_DIR/oe.py -f
|
python_compile $ADDON_INSTALL_DIR/oe.py
|
||||||
rm -rf $ADDON_INSTALL_DIR/oe.py
|
|
||||||
}
|
}
|
||||||
|
|
||||||
post_install() {
|
post_install() {
|
||||||
|
@ -352,6 +352,9 @@ post_makeinstall_target() {
|
|||||||
cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/kodi/media/Fonts
|
cp $PKG_DIR/fonts/*.ttf $INSTALL/usr/share/kodi/media/Fonts
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Compile kodi Python site-packages to .pyc bytecode, and remove .py source code
|
||||||
|
python_compile $INSTALL/usr/lib/$PKG_PYTHON_VERSION/site-packages/kodi
|
||||||
|
|
||||||
debug_strip $INSTALL/usr/lib/kodi/kodi.bin
|
debug_strip $INSTALL/usr/lib/kodi/kodi.bin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ pre_configure_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";"
|
python_remove_source
|
||||||
|
|
||||||
rm -rf $INSTALL/usr/bin
|
rm -rf $INSTALL/usr/bin
|
||||||
rm -rf $INSTALL/usr/share/pygobject
|
rm -rf $INSTALL/usr/share/pygobject
|
||||||
|
@ -26,7 +26,7 @@ makeinstall_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";"
|
python_remove_source
|
||||||
|
|
||||||
rm -rf $INSTALL/usr/bin
|
rm -rf $INSTALL/usr/bin
|
||||||
}
|
}
|
||||||
|
@ -35,5 +35,5 @@ makeinstall_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";"
|
python_remove_source
|
||||||
}
|
}
|
||||||
|
@ -19,5 +19,5 @@ pre_configure_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";"
|
python_remove_source
|
||||||
}
|
}
|
||||||
|
@ -25,6 +25,7 @@ makeinstall_target() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
post_makeinstall_target() {
|
post_makeinstall_target() {
|
||||||
find $INSTALL/usr/lib -name "*.py" -exec rm -rf "{}" ";"
|
python_remove_source
|
||||||
|
|
||||||
rm -rf $INSTALL/usr/lib/python*/site-packages/*/tests
|
rm -rf $INSTALL/usr/lib/python*/site-packages/*/tests
|
||||||
}
|
}
|
||||||
|
@ -10,3 +10,7 @@ PKG_SITE="http://www.X.org"
|
|||||||
PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
PKG_URL="http://xcb.freedesktop.org/dist/$PKG_NAME-$PKG_VERSION.tar.bz2"
|
||||||
PKG_DEPENDS_TARGET="toolchain util-macros Python3:host"
|
PKG_DEPENDS_TARGET="toolchain util-macros Python3:host"
|
||||||
PKG_LONGDESC="X C-language Bindings protocol headers."
|
PKG_LONGDESC="X C-language Bindings protocol headers."
|
||||||
|
|
||||||
|
post_makeinstall_target() {
|
||||||
|
python_remove_source
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user