2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-07-02 14:02:27 +00:00

python: Rebuild all subpackages if required.

This commit is contained in:
Dylan Araps 2019-07-17 10:15:07 +03:00
parent bd93e07201
commit fa56ed1ad3
3 changed files with 37 additions and 1 deletions

View File

@ -8,3 +8,24 @@ make
make DESTDIR="$1" install
ln -s python3 "$1/usr/bin/python"
# Rebuild all python subpackages if required.
{
# Exit here if python is not installed.
command -v python3 >/dev/null || exit 0
# Figure out the system's python version.
python_sys=$(kiss l python)
python_sys=${python_sys#* }
python_sys=${python_sys#?.}
python_sys=${python_sys%.*}
# Figure out this python version.
read -r python_repo _ < "${0%/*}/version"
python_repo=${python_repo#?.}
python_repo=${python_repo%.*}
# If the two python versions match, exit here.
[ "$python_sys" = "$python_repo" ] ||
:>/tmp/python-REBUILD
}

15
extra/python/post-install Executable file
View File

@ -0,0 +1,15 @@
#!/bin/sh -e
[ -f /tmp/python-REBUILD ] || exit 0
rm -f /tmp/python-REBUILD
# Rebuild all python subpackages if the above file existed.
kiss l | while read -r pkg _; do
case $pkg in
python-*)
kiss build "$pkg"
kiss install "$pkg"
;;
esac
done

View File

@ -1 +1 @@
3.6.8 1
3.6.8 2