Serenity Operating System
at portability 26 lines 869 B view raw
1#!/bin/bash ../.port_include.sh 2 3source version.sh 4 5port=python-3.6 6version=3.6 7workdir=Python-3.6.0 8useconfigure=true 9configopts="--build=i686 --without-threads --enable-optimizations --without-ensurepip" 10makeopts="-j$(nproc) build_all" 11installopts="-j$(nproc) build_all" 12files="${PYTHON_URL} ${PYTHON_ARCHIVE}" 13 14export CONFIG_SITE=$(pwd)/config.site 15 16if [ -x "$(command -v python3)" ]; then 17 # check if major and minor version of python3 are matching 18 if python3 -c "import sys;sys.exit('.'.join(str(n) for n in sys.version_info[:2]) in '$PYTHON_VERSION')"; then 19 echo 'Error: python3 version does not match needed version to build:' $PYTHON_VERSION >&2 20 echo 'Please build python3.6 with Toolchain/BuildPython.sh !' >&2 21 exit 1 22 fi 23else 24 echo 'Error: python3 is not installed, please build python3.6 with Toolchain/BuildPython.sh !' >&2 25 exit 1 26fi