2
0
mirror of https://codeberg.org/kiss-community/repo synced 2025-01-05 01:10:07 -07:00
repo/extra/python/build

32 lines
730 B
Plaintext
Raw Normal View History

2019-06-25 09:24:27 -06:00
#!/bin/sh -e
./configure \
2019-06-27 03:10:08 -06:00
--prefix=/usr \
--without-ensurepip
2019-06-25 09:24:27 -06:00
make
make DESTDIR="$1" install
2019-06-25 11:08:58 -06:00
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
}