diff options
author | Emanuel Sprung <emanuel.sprung@gmail.com> | 2019-11-13 01:08:35 +0100 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-11-25 11:57:18 +0100 |
commit | 3c8a1ea386fd8b4b2e2419047adc2a543fb28619 (patch) | |
tree | 96adc415eccaa2111e60244371c891c841c66123 /Ports | |
parent | 794ca16cca44beec749ec499a37cf2fe152b93c6 (diff) | |
download | serenity-3c8a1ea386fd8b4b2e2419047adc2a543fb28619.zip |
Ports: check for native python3 installation, add build script
For python3 cross compilation, a native installation of python3 is
needed. This patch adds a build script for python3 to the toolchain
and informs the user to run that script if the python port is build
and no native python3 with the same major and minor version is
being found.
Diffstat (limited to 'Ports')
-rwxr-xr-x | Ports/python-3.6/package.sh | 17 | ||||
-rw-r--r-- | Ports/python-3.6/version.sh | 4 |
2 files changed, 20 insertions, 1 deletions
diff --git a/Ports/python-3.6/package.sh b/Ports/python-3.6/package.sh index 95ee3e39ae..2ef11740c1 100755 --- a/Ports/python-3.6/package.sh +++ b/Ports/python-3.6/package.sh @@ -1,4 +1,7 @@ #!/bin/bash ../.port_include.sh + +source version.sh + port=python-3.6 version=3.6 workdir=Python-3.6.0 @@ -6,6 +9,18 @@ useconfigure=true configopts="--build=i686 --without-threads --enable-optimizations" makeopts="-j$(nproc) build_all" installopts="-j$(nproc) build_all" -files="https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xz Python-3.6.0.tar.xz" +files="${PYTHON_URL} ${PYTHON_ARCHIVE}" export CONFIG_SITE=$(pwd)/config.site + +if [ -x "$(command -v python3)" ]; then + # check if major and minor version of python3 are matching + if python3 -c "import sys;sys.exit('.'.join(str(n) for n in sys.version_info[:2]) in '$PYTHON_VERSION')"; then + echo 'Error: python3 version does not match needed version to build:' $PYTHON_VERSION >&2 + echo 'Please build python3.6 with Toolchain/BuildPython.sh !' >&2 + exit 1 + fi +else + echo 'Error: python3 is not installed, please build python3.6 with Toolchain/BuildPython.sh !' >&2 + exit 1 +fi diff --git a/Ports/python-3.6/version.sh b/Ports/python-3.6/version.sh new file mode 100644 index 0000000000..a3efc436fb --- /dev/null +++ b/Ports/python-3.6/version.sh @@ -0,0 +1,4 @@ +PYTHON_VERSION="3.6.0" +PYTHON_MD5SUM="82b143ebbf4514d7e05876bed7a6b1f5" +PYTHON_ARCHIVE="Python-$PYTHON_VERSION.tar.xz" +PYTHON_URL="https://www.python.org/ftp/python/$PYTHON_VERSION/${PYTHON_ARCHIVE}" |