Bläddra i källkod

Adds python, updates host list files to include it (#4)

* Adds python, updates host list files to include it

Synced the host list files from the internal repo, and also
added the python package build scripts.

Signed-off-by: lawsonamzn <[email protected]>
Nicholas Lawson 4 år sedan
förälder
incheckning
a429309b86

+ 43 - 0
package-system/python/build_package_image.py

@@ -0,0 +1,43 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this script builds python for linux and darwin_x64
+# and places the result in linux_x64/package or darwin_x64/package 
+import subprocess
+import sys
+import os
+import platform
+
+folder_names = { #   subfolder     interpreter     build script 
+    'darwin'     : ('darwin_x64' , 'Python.framework/Versions/3.7/bin/python3', 'make-python.sh'),
+    'linux'      : ('linux_x64'  , 'python/bin/python', 'make-python.sh'),
+    'windows'    : ('win_x64'    , 'python/python.exe', 'build_python.bat')
+}
+
+platformsys = platform.system().lower()
+
+# intentionally generate a keyerror if its not a good platform:
+subfolder_name, binary_relpath, build_script = folder_names[platformsys]
+
+script_dir = os.path.dirname(os.path.realpath(__file__))
+build_script_dir = os.path.join(script_dir, subfolder_name)
+test_script_name = os.path.join(script_dir, 'quick_validate_python.py')
+build_script_name = os.path.join(build_script_dir, build_script)
+
+# the built python is expected to be in build script dir/package/...
+python_dir = os.path.join(build_script_dir, 'package' )
+python_executable = os.path.join(python_dir, binary_relpath)
+
+# build python using the build script
+result_value = subprocess.run([build_script_name], shell=True, cwd=build_script_dir)
+
+if result_value.returncode != 0:
+    sys.exit(result_value.returncode)
+
+# test out the freshly created python executable:
+result_value = subprocess.run([python_executable, test_script_name], cwd=python_dir)
+sys.exit(result_value.returncode)

+ 2 - 0
package-system/python/darwin_x64/.gitignore

@@ -0,0 +1,2 @@
+temp/
+package/

+ 66 - 0
package-system/python/darwin_x64/FindPython.cmake

@@ -0,0 +1,66 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file actually ingests the library and defines targets.
+set(MY "Python")
+set(TARGET_WITH_NAMESPACE "3rdParty::${MY}")
+if (TARGET ${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+# this FindPython file is designed to be compatible with the base FindPython
+# to at least some degree.  As such, it uses the same variable names:
+
+# this script defines:
+# Python_EXECUTABLE - full path to executable
+# Python_INTERPRETER_ID - "Python"
+# Python_HOME - Where the python folder root is (ie, folder has subfolder of 'Lib')
+# Python_PATHS - Where sys.path should point at to find modules, libraries, etc.
+# Python_Development_FOUND - The platform we are cross compiling for can link to python
+# and a target called 3rdParty::Python that you can use to depend on
+set(PY_BASE_DIR ${CMAKE_CURRENT_LIST_DIR}/Python.framework/Versions/3.7)
+set(${MY}_VERSION 3.7.10)
+set(${MY}_INTERPRETER_ID    "Python")
+set(${MY}_EXECUTABLE        ${PY_BASE_DIR}/bin/python3)
+set(${MY}_HOME              ${PY_BASE_DIR})
+set(${MY}_PATHS             ${PY_BASE_DIR}/lib
+                            ${PY_BASE_DIR}/lib/python3.7
+                            ${PY_BASE_DIR}/lib/python3.7/lib-dynload
+                            ${PY_BASE_DIR}/lib/python3.7/site-packages) 
+                       
+# only if we're compiling FOR on one of the available platforms, add the target and libraries:
+if (${PAL_PLATFORM_NAME} STREQUAL "Mac" )
+    set(${MY}_Development_FOUND TRUE)
+    # Do not use these  PYTHON_LIBRARY_* or other variables, instead, use the 
+    # target '3rdParty::Python'
+    # note:  we built the shared version of python, you must use the .so
+    # in order to load it.  If you don't, then python itself will load a module
+    # from a .so and that module will try to load the dylib for python itself
+    # and bad things will occur since there'll essentially be both the static 
+    # and dy version of python in one address space.
+    set(${MY}_INCLUDE_DIR     ${PY_BASE_DIR}/Headers)
+
+    set(${MY}_COMPILE_DEFINITIONS DEFAULT_LY_PYTHONHOME="${MY}_HOME")
+
+    # Python uses the same file for both its import library which you link against
+    # and the dylib that it needs if you do:
+    set(${MY}_LIBRARY "${PY_BASE_DIR}/Python")
+    set(${MY}_DYLIBS "${PY_BASE_DIR}/Python")
+
+    # now set up the target using the above declarations....
+    add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+    ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY}_INCLUDE_DIR})
+    target_link_libraries(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_LIBRARY}")
+    target_compile_definitions(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_COMPILE_DEFINITIONS}")
+
+    # we also need to add the python dlls to be copied to the binaries folder...
+    if (${MY}_DYLIBS)
+        set_target_properties(${TARGET_WITH_NAMESPACE} PROPERTIES INTERFACE_IMPORTED_LOCATION "${${MY}_DYLIBS}")
+    endif()
+endif()
+
+set(${MY}_FOUND True)

+ 6 - 0
package-system/python/darwin_x64/PackageInfo.json

@@ -0,0 +1,6 @@
+{
+    "PackageName" : "python-3.7.10-rev1-darwin",
+    "License"     : "PSF-2.0",
+    "URL"         : "https://python.org",
+    "LicenseFile" : "LICENSE"
+}

+ 171 - 0
package-system/python/darwin_x64/make-python.sh

@@ -0,0 +1,171 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# REQUIREMENTS:
+#  * 'git' installed and on path
+#  * 'python3' installed and on path (can be any version > 2.7 including 3.x)
+#  * xcode command line tools installed and on path ('install_name_tool' and 'otool')
+
+# HOW IT WORKS:
+# * Downloads https://github.com/gregneagle/relocatable-python.git (Apache 2.0 License)
+# * applies the above with open3d_patch.patch (See contents of that patch).
+# * Fetches python from the official python repository
+# * patches python with open3d_python.patch to shortcut the package building process (we don't need)
+#   a full installer, just the framework.
+# * Ensures you have the necessary environment vars set and pip packages installed in a pip virtualenv
+# * builds python using python.org official mac package builder we've patched.
+# * Uses the relocatable-python script to generate a 'package' folder containing real python but
+#    with rpaths patched to be relocatable.
+# * Replaces the 'identifier' of the main python dylib to be relative to current dir.
+# * Deploys the finished framework to a the package layout folder using rsync.
+# * Copies the license files inside python to the package layout folder
+# * Copies the other package system file (json and cmake) to the pacakge layout folder.
+#
+# The result is a 'package' subfolder containing the package files such as PackageInfo.json
+# and a subfolder containing the official python but patched so that they work in that folder structure
+# regardless of where the folder is, instead of having absolute paths baked in.
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cd $SCRIPT_DIR
+
+echo ""
+echo "------------------ PYTHON PACKAGE BUILD SCRIPT -------------------"
+echo ""
+echo "BASIC REQUIREMENTS:"
+echo "   - git installed and in PATH"
+echo "   - XCODE and xcode command line tools installed: xcode-select --install"
+echo "   - python3 installed and in PATH."
+echo ""
+
+echo "--------------- Clearing any previous package folder -------------"
+rm -rf package
+
+echo "---------------- Clearing any previous temp folder ---------------"
+rm -rf temp
+
+mkdir temp
+cd temp
+
+mkdir $SCRIPT_DIR/package
+
+echo "-------------- Cloning python from git --------------"
+git clone https://github.com/python/cpython.git --branch "v3.7.10" --depth 1
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error cloning python!"
+    exit $retVal
+fi
+
+echo "-------------- Cloning relocatable-python from git --------------"
+git clone https://github.com/gregneagle/relocatable-python.git
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error cloning relocatable-python!"
+    exit $retVal
+fi
+
+PYTHON_SRC_DIR=$SCRIPT_DIR/temp/cpython
+RELOC_SRC_DIR=$SCRIPT_DIR/temp/relocatable-python
+
+echo "------------- creating python virtual environment ----------"
+cd $SCRIPT_DIR/temp
+python3 -m venv py_venv
+VENV_BIN_DIR=$SCRIPT_DIR/temp/py_venv/bin
+PYTHONNOUSERSITE=1
+
+echo "------ Installing spinx documentation tool into the v-env -----"
+$VENV_BIN_DIR/python3 -m pip install sphinx
+
+cd $RELOC_SRC_DIR
+echo "----- Checking out specific commit hash of relocatable-python -----"
+# the hash is a known good commit hash.  This also causes it to fail if someone
+# tampers the repo!
+git reset --hard 5e459c3ccea0daaf181f3b1ef2773dbefce1a563
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error resetting to specific change!"
+    exit $retVal
+fi
+
+echo "------------------- patching the relocator -----------------------"
+echo Currently in `pwd`
+echo patch -p1 $SCRIPT_DIR/open3d_patch.patch
+patch -p1 < $SCRIPT_DIR/open3d_patch.patch
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Could not patch the relocator!"
+    exit $retVal
+fi
+
+
+cd $PYTHON_SRC_DIR
+echo "------------------- patching the python Mac package-maker -----------------------"
+patch -p1 < $SCRIPT_DIR/open3d_python.patch
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Could not patch the python package maker!"
+    exit $retVal
+fi
+
+echo "-------------- Building a Mac python package from official sources ----------"
+cd $PYTHON_SRC_DIR
+cd Mac
+cd BuildScript
+# the following env vars get around a problem compiling tcl/tk
+tcl_cv_strtod_buggy=1 ac_cv_func_strtod=yes SDK_TOOLS_BIN=$VENV_BIN_DIR $VENV_BIN_DIR/python3 ./build-installer.py --universal-archs=intel-64 --build-dir $SCRIPT_DIR/temp/python_build --third-party=$SCRIPT_DIR/temp/downloaded_packages --dep-target=10.9
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Could not build python!"
+    exit $retVal
+fi
+
+# the output of the build $SCRIPT_DIR/temp/python_build/_root/Library/Frameworks and that folder will contain Python.framework
+# we use the --use-existing-framework to point the script at that framework we just made:
+FRAMEWORK_OUTPUT_FOLDER=$SCRIPT_DIR/temp/python_build/_root/Library/Frameworks
+echo Framework output folder: $FRAMEWORK_OUTPUT_FOLDER
+cd $RELOC_SRC_DIR
+echo "---------- Altering the produced framework folder to be relocatable ---------"
+echo $VENV_BIN_DIR/python3 ./make_relocatable_python_framework.py --install-wheel --upgrade-pip --python-version 3.7.10 --use-existing-framework $FRAMEWORK_OUTPUT_FOLDER/Python.framework
+$VENV_BIN_DIR/python3 ./make_relocatable_python_framework.py --install-wheel --upgrade-pip --python-version 3.7.10 --use-existing-framework $FRAMEWORK_OUTPUT_FOLDER/Python.framework
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Could not make python relocatable!"
+    exit $retVal
+fi
+
+echo "------------------ Final RPATH update --------------"
+# The filename of the main python dylib is 'Python'.
+# It is located at ./package/Python.framework/Versions/3.7
+# This, despite just being called 'Python' with no extension is actually the main python 
+# dylib that is required to load if you link your application to the import library for 
+# Python.  The below change of its 'id' (which is what programs link to it will import it as)
+# allows programs linked ot it to work as long the dylib is deployed to the executable,
+# and as long as the executable adds the executable's path to its list of @rpath to search.
+# (Instead of its original which is "@rpath/Versions/3.7/Python" which would require us to
+# copy it to such a subfolder)
+# Because all the python framework libraries already have 2 rpaths, the @loader_path
+# as well as the root of the framework (ie, @loader_path/../../../.. etc), this makes
+# the whole thing work regardless of whether Python is in the same folder as the binary or 
+# whether a python native plugin is being located from the framework in some subfolder.
+install_name_tool -id @rpath/Python $FRAMEWORK_OUTPUT_FOLDER/Python.framework/Versions/3.7/Python
+
+echo "-------------- rsync package layout into $SCRIPT_DIR/package ------------"
+mdkir $SCRIPT_DIR/package
+rsync -avu --delete "$FRAMEWORK_OUTPUT_FOLDER/" "$SCRIPT_DIR/package"
+
+echo "---------- Copying Open3DEngine package metadata and license file ------------"
+# the tar contains a 'Python.framework' sub folder
+cd $SCRIPT_DIR/package
+cp $SCRIPT_DIR/package/Python.framework/Versions/3.7/lib/python3.7/LICENSE.txt ./LICENSE
+cp $SCRIPT_DIR/PackageInfo.json .
+cp $SCRIPT_DIR/*.cmake .
+
+echo "--------------  Cleaning temp folder -----------------"
+rm -rf $SCRIPT_DIR/temp
+
+echo "DONE! Package layout folder has been created in $SCRIPT_DIR/package"
+exit 0

+ 70 - 0
package-system/python/darwin_x64/open3d_patch.patch

@@ -0,0 +1,70 @@
+diff --git a/locallibs/install.py b/locallibs/install.py
+index 64593a2..0162761 100644
+--- a/locallibs/install.py
++++ b/locallibs/install.py
+@@ -23,7 +23,7 @@ import sys
+ 
+ PYTHON2_EXTRA_PKGS = ["xattr==0.6.4", "pyobjc"]
+ 
+-PYTHON3_EXTRA_PKGS = ["cffi", "xattr", "pyobjc", "six"]
++PYTHON3_EXTRA_PKGS = []
+ 
+ 
+ def ensure_pip(framework_path, version):
+diff --git a/locallibs/relocatablizer.py b/locallibs/relocatablizer.py
+index 6968564..222efce 100644
+--- a/locallibs/relocatablizer.py
++++ b/locallibs/relocatablizer.py
+@@ -92,6 +92,19 @@ def fix_dep(some_file, old_install_name, new_install_name):
+     ]
+     run(cmd)
+ 
++    add_framework_rpath(some_file)
++
++def add_framework_rpath(some_file):
++    """Adds a RPATH that refers to the framework root so that the binary can run
++    even if invoked from another binary (ie, for embedding) that is not in the framework root"""
++    framework_loc = framework_dir(some_file)
++    rpath = os.path.join(
++            "@loader_path/",
++            os.path.relpath(framework_loc, os.path.dirname(some_file))
++        )
++    if rpath not in get_rpaths(some_file):
++        cmd = [INSTALL_NAME_TOOL, "-add_rpath", rpath, some_file]
++        run(cmd)
+ 
+ def get_rpaths(some_file):
+     """returns rpaths stored in an executable"""
+diff --git a/make_relocatable_python_framework.py b/make_relocatable_python_framework.py
+index f3767a3..bb49acb 100755
+--- a/make_relocatable_python_framework.py
++++ b/make_relocatable_python_framework.py
+@@ -79,14 +79,23 @@ def main():
+         action="store_true",
+         help="Upgrade pip prior to installing extra python modules."
+     )
++    parser.add_option(
++        "--use-existing-framework",
++        default=None,
++        help="Specify a path to a Python.framework folder instead of downloading"
++    )
++
+     parser.set_defaults(unsign=True)
+     options, _arguments = parser.parse_args()
+ 
+-    framework_path = get.FrameworkGetter(
+-        python_version=options.python_version,
+-        os_version=options.os_version,
+-        base_url=options.baseurl,
+-    ).download_and_extract(destination=options.destination)
++    framework_path = options.use_existing_framework
++
++    if not framework_path:
++        framework_path = get.FrameworkGetter(
++            python_version=options.python_version,
++            os_version=options.os_version,
++            base_url=options.baseurl,
++        ).download_and_extract(destination=options.destination)
+ 
+     if framework_path:
+         files_relocatablized = relocatablize(framework_path)

+ 16 - 0
package-system/python/darwin_x64/open3d_python.patch

@@ -0,0 +1,16 @@
+diff --git a/Mac/BuildScript/build-installer.py b/Mac/BuildScript/build-installer.py
+index 4fab4882ef..3c10e2dbe1 100755
+--- a/Mac/BuildScript/build-installer.py
++++ b/Mac/BuildScript/build-installer.py
+@@ -1522,6 +1522,11 @@ def buildInstaller():
+     pkgroot = os.path.join(outdir, 'Python.mpkg', 'Contents')
+     pkgcontents = os.path.join(pkgroot, 'Packages')
+     os.makedirs(pkgcontents)
++
++    #o3de modification:  We don't need packages for our purposes, so we return immediately:
++    return
++
++
+     for recipe in pkg_recipes():
+         packageFromRecipe(pkgcontents, recipe)
+ 

+ 2 - 0
package-system/python/linux_x64/.gitignore

@@ -0,0 +1,2 @@
+temp/
+package/

+ 10 - 0
package-system/python/linux_x64/FindPython.cmake

@@ -0,0 +1,10 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# force this into config mode, so that it uses the config files instead of module files.
+set(Python_DIR ${CMAKE_CURRENT_LIST_DIR})
+find_package(Python 3.7.10 REQUIRED CONFIG)

+ 6 - 0
package-system/python/linux_x64/PackageInfo.json

@@ -0,0 +1,6 @@
+{
+    "PackageName" : "python-3.7.10-rev2-linux",
+    "License"     : "PSF-2.0",
+    "URL"         : "https://python.org",
+    "LicenseFile" : "python/LICENSE"
+}

+ 137 - 0
package-system/python/linux_x64/make-python.sh

@@ -0,0 +1,137 @@
+#!/bin/bash
+
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
+cd $SCRIPT_DIR
+
+echo ""
+echo "------ BUILDING PYTHON FROM SOURCE ------"
+echo ""
+echo "BASIC REQUIREMENTS in case something goes wrong:"
+echo "   - git installed and in PATH"
+echo "   - packages installed: apt-get dev-essential tk8.6-dev python3 libssl-dev tcl8.6-dev libbz2-dev libgdbm-compat-dev liblzma-dev libsqlite3-dev libreadline-dev"
+echo "   - python3 with pip in PATH! (i.e. sudo apt install python3 and sudo apt install python3-pip"
+echo "   - Note: This script is currently written for buildng on Ubuntu Linux only."
+echo "   - Note: installing binaries with pip must result with them being on PATH."
+echo ""
+
+# Make sure we have all the required dev packages
+REQUIRED_DEV_PACKAGES="tk8.6-dev python3 libssl-dev tcl8.6-dev libbz2-dev libgdbm-compat-dev liblzma-dev libsqlite3-dev libreadline-dev"
+ALL_PACKAGES=`apt list 2>/dev/null`
+for req_package in $REQUIRED_DEV_PACKAGES
+do
+    PACKAGE_COUNT=`echo $ALL_PACKAGES | grep $req_package | wc -l`
+    if [[ $PACKAGE_COUNT -eq 0 ]]; then
+        echo Missing required package $req_package
+        exit 1
+    fi
+done
+
+
+if [[ ${PACKAGE_CLEAR_TEMP_FOLDERS} -gt 0 ]]; then
+    echo "   - PACKAGE_CLEAR_TEMP_FOLDERS env var is set > 0, will clear temp folders."
+else
+    echo "   - PACKAGE_CLEAR_TEMP_FOLDERS env var not set or = 0, will not clear temp."
+fi
+echo "   ... this will take about one and a half hours ..."
+echo ""
+
+mkdir -p temp
+
+
+echo ------------------------ GIT CLONE python 3.7 --------------------
+cd temp
+git clone https://github.com/python/cpython.git --branch 3.7 --depth 1
+
+if [[ ! -d "cpython" ]]; then
+    echo "Was unable to create cpython dir via git clone.  Is git installed?"
+    exit 1
+fi
+cd cpython
+
+# Build from the source with optimizations and shared libs enabled , and override the RPATH
+./configure --prefix=$SCRIPT_DIR/package/python --enable-optimizations --enable-shared LDFLAGS='-Wl,-rpath=\$$ORIGIN:\$$ORIGIN/../lib:\$$ORIGIN/../..'
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error running configuring optimized build"
+    exit $retVal
+fi
+
+make
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error compiling optimized build"
+    exit $retVal
+fi
+
+# Prepare the package folder
+cd $SCRIPT_DIR
+
+# Install the newly built python 3.7.10 to the package/python folder
+cd $SCRIPT_DIR
+cd temp
+cd cpython
+
+make install
+retVal=$?
+if [ $retVal -ne 0 ]; then
+    echo "Error installing python to the package folder"
+    exit $retVal
+fi
+
+cd $SCRIPT_DIR
+mkdir -p package
+cd package
+
+cp $SCRIPT_DIR/temp/cpython/LICENSE ./python/LICENSE
+cp $SCRIPT_DIR/PackageInfo.json .
+cp $SCRIPT_DIR/*.cmake .
+
+cd $SCRIPT_DIR/package/python/bin
+ln -s python3 python
+cd $SCRIPT_DIR/package
+
+echo "----------------------------- Upgrading pip ----------------"
+# the pip that may come from the above repo can be broken, so we'll use get-pip
+# and then upgrade it.
+curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
+./python/bin/python3 get-pip.py
+rm get-pip.py
+PYTHONNOUSERSITE=1 ./python/bin/python3 -m pip install --upgrade pip
+
+
+# installing pip causes it to put absolute paths to python
+# in the pip files (in bin).  For example, pip will have 
+# a line at the top that starts with #!/full/path/to/python 
+# so we fix those up too. 
+# We want to change it from and absolute path to python
+# to a multi-line #! that runs python from the same folder as the file is being called from: 
+#!/bin/sh 
+#"exec" "`dirname $0`/python" "$0" "$@"
+sed -i "1s+.*+\#\!/bin/sh+" ./python/bin/pip* 
+sed -i "2i\\
+\"exec\" \"\`dirname \$0\`/python\" \"\$0\" \"\$\@\" " ./python/bin/pip*
+
+echo ""
+echo "------ PYTHON WAS BUILT FROM SOURCE -----"
+echo ""
+
+echo "Package has completed building, and is now in $SCRIPT_DIR/package"
+
+if [[ ${PACKAGE_CLEAR_TEMP_FOLDERS} -gt 0 ]]
+    then
+        echo "Deleting temp folders because PACKAGE_CLEAR_TEMP_FOLDERS is set to > 0"
+        rm -rf $SCRIPT_DIR/temp
+    else
+        echo "PACKAGE_CLEAR_TEMP_FOLDERS is unset or zero, temp folder retained."
+        echo "Running this script again without deleting temp will just update the package without"
+        echo "The two hour wait time to build everything from scratch..."
+
+fi
+exit 0

+ 39 - 0
package-system/python/linux_x64/python-config-version.cmake

@@ -0,0 +1,39 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file is called to make sure that if we request a specific version
+# we respond only to that version
+
+set(PACKAGE_VERSION 3.7.10)
+set(PACKAGE_VERSION_EXACT False)
+set(PACKAGE_VERSION_COMPATIBLE False)
+
+if (NOT ${PACKAGE_FIND_NAME} STREQUAL "Python")
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 0 AND NOT PACKAGE_FIND_VERSION_MAJOR EQUAL 3)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 1 AND NOT PACKAGE_FIND_VERSION_MINOR EQUAL 7)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 2 AND NOT PACKAGE_FIND_VERSION_PATCH EQUAL 10)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 3)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+    set(PACKAGE_VERSION_EXACT TRUE)
+endif()
+
+set(PACKAGE_VERSION_COMPATIBLE TRUE)

+ 72 - 0
package-system/python/linux_x64/python-config.cmake

@@ -0,0 +1,72 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file actually ingests the library and defines targets.
+set(MY "Python")
+set(TARGET_WITH_NAMESPACE "3rdParty::${MY}")
+if (TARGET ${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+# this FindPython file is designed to be compatible with the base FindPython
+# to at least some degree.  As such, it uses the same variable names:
+
+# this script defines:
+# Python_EXECUTABLE - full path to executable
+# Python_INTERPRETER_ID - "Python"
+# Python_HOME - Where the python folder root is (ie, folder has subfolder of 'Lib')
+# Python_PATHS - Where sys.path should point at to find modules, libraries, etc.
+# Python_Development_FOUND - The platform we are cross compiling for can link to python
+# and a target called 3rdParty::Python that you can use to depend on
+
+set(${MY}_VERSION 3.7.10)
+set(${MY}_INTERPRETER_ID    "Python")
+set(${MY}_EXECUTABLE        ${CMAKE_CURRENT_LIST_DIR}/python/bin/python)
+set(${MY}_HOME              ${CMAKE_CURRENT_LIST_DIR}/python)
+set(${MY}_PATHS             ${CMAKE_CURRENT_LIST_DIR}/python/lib
+                            ${CMAKE_CURRENT_LIST_DIR}/python/lib/python3.7
+                            ${CMAKE_CURRENT_LIST_DIR}/python/lib/python3.7/lib-dynload
+                            ${CMAKE_CURRENT_LIST_DIR}/python/lib/python3.7/site-packages) 
+
+# only if we're compiling FOR on one of the available platforms, add the target and libraries:
+if (${PAL_PLATFORM_NAME} STREQUAL "Linux" )
+    set(${MY}_Development_FOUND TRUE)
+    # Do not use these  PYTHON_LIBRARY_* or other variables, instead, use the 
+    # target '3rdParty::Python'
+    # note:  we built the shared version of python, you must use the .so
+    # in order to load it.  If you don't, then python itself will load a module
+    # from a .so and that module will try to load the dylib for python itself
+    # and bad things will occur since there'll essentially be both the static 
+    # and dy version of python in one address space.
+    # also, because the regular .so is a symlink, we actually skip that and link
+    # to the real one, so that there's no conflict between what library we copy
+    # and what library we link to.
+    set(${MY}_LIBRARY_DEBUG   ${CMAKE_CURRENT_LIST_DIR}/python/lib/libpython3.7m.so.1.0)
+    set(${MY}_LIBRARY_RELEASE ${CMAKE_CURRENT_LIST_DIR}/python/lib/libpython3.7m.so.1.0)
+    set(${MY}_INCLUDE_DIR     ${CMAKE_CURRENT_LIST_DIR}/python/include/python3.7m)
+    # DYLIBS causes things to be copied to the bin folder to satisfy RPATH origin
+    set(${MY}_DYLIBS_DEBUG    ${CMAKE_CURRENT_LIST_DIR}/python/lib/libpython3.7m.so.1.0)
+    set(${MY}_DYLIBS_RELEASE  ${CMAKE_CURRENT_LIST_DIR}/python/lib/libpython3.7m.so.1.0)
+
+    set(${MY}_COMPILE_DEFINITIONS DEFAULT_LY_PYTHONHOME="${CMAKE_CURRENT_LIST_DIR}/python")
+
+    # the rest of this file could be reused for almost any target:
+    # we set it to a generator expression for multi-config situations:
+    set(${MY}_LIBRARY "$<IF:$<CONFIG:Debug>,${${MY}_LIBRARY_DEBUG},${${MY}_LIBRARY_RELEASE}>")
+    set(${MY}_DYLIBS "$<IF:$<CONFIG:Debug>,${${MY}_DYLIBS_DEBUG},${${MY}_DYLIBS_RELEASE}>")
+
+    # now set up the target using the above declarations....
+    add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+    ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY}_INCLUDE_DIR})
+    target_link_libraries(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_LIBRARY}")
+    target_compile_definitions(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_COMPILE_DEFINITIONS}")
+
+    # we also need to add the python dlls to be copied to the binaries folder...
+    set_target_properties(${TARGET_WITH_NAMESPACE} PROPERTIES INTERFACE_IMPORTED_LOCATION "${${MY}_DYLIBS}")
+endif()
+
+set(${MY}_FOUND True)

+ 24 - 0
package-system/python/quick_validate_python.py

@@ -0,0 +1,24 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this script is run on built python executables to make sure they function.
+
+import sys
+
+try:
+    import tkinter
+    import ssl
+    import sqlite3
+    import encodings
+    import tarfile
+    import lzma
+except Exception as e:
+    print("Failed: " + e)
+    sys.exit(1)
+
+print("Validated OK")
+sys.exit(0)

+ 3 - 0
package-system/python/win_x64/.gitignore

@@ -0,0 +1,3 @@
+temp/
+package/
+

+ 10 - 0
package-system/python/win_x64/FindPython.cmake

@@ -0,0 +1,10 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# force this into config mode, so that it uses the config files instead of module files.
+set(Python_DIR ${CMAKE_CURRENT_LIST_DIR})
+find_package(Python 3.7.10 REQUIRED CONFIG)

+ 6 - 0
package-system/python/win_x64/PackageInfo.json

@@ -0,0 +1,6 @@
+{
+    "PackageName" : "python-3.7.10-rev1-windows",
+    "URL"         : "https://python.org",
+    "License"     : "python-2.0",
+    "LicenseFile" : "python/LICENSE.txt"
+}

+ 110 - 0
package-system/python/win_x64/build_python.bat

@@ -0,0 +1,110 @@
+@setlocal enabledelayedexpansion
+@echo off
+
+REM
+REM Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+REM 
+REM SPDX-License-Identifier: Apache-2.0 OR MIT
+REM
+REM
+
+set ScriptDir=%~dp0
+set outputdir=%ScriptDir%package
+set tempdir=%ScriptDir%temp
+set python_src=%tempdir%\cpython
+
+rem dont allow python to read pip packages from user's local folder
+set PYTHONNOUSERSITE=1
+
+echo Building python from source - Basic requirements:
+echo     - Visual studio vc141 build tools installed (VS2017).  This can be installed into vs2019 or above.
+echo     - git installed
+echo. 
+echo  ... This will take about 10 minutes ...
+echo.
+
+set vswhere_location=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer
+
+echo adding %vswhere_location% to PATH
+set PATH=%vswhere_location%;%PATH%
+
+for /f "tokens=*" %%i in ('vswhere -property installationPath') do set VS2017_LOCATION=%%i
+
+echo Using Visual Studio: %VS2017_LOCATION%
+
+if NOT exist "%VS2017_LOCATION%\Common7\Tools\vsdevcmd.bat" (
+     echo Could not find visual studio 2017 installed
+    exit /B 1
+ )
+call "%VS2017_LOCATION%\Common7\Tools\vsdevcmd.bat"
+
+
+echo Clearing %tempdir% if present...
+rmdir /s /q %tempdir% > NUL
+echo Clearing %outputdir% if present...
+rmdir /s /q %outputdir% > NUL
+
+mkdir %outputdir%
+mkdir %tempdir%
+cd /d %tempdir%
+
+echo Cloning python from git using v3.7.10...
+git clone https://github.com/python/cpython.git --branch "v3.7.10" --depth 1
+if %ERRORLEVEL% NEQ 0 (
+    echo "Git clone failed"
+    exit /B 1
+)
+
+cd /d %python_src%
+call .\PCBuild\get_externals.bat
+
+msbuild.exe "%python_src%\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /p:Configuration=Debug /p:Platform=x64 /p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:PlatformToolset=v141
+if %ERRORLEVEL% NEQ 0 (
+  echo Failed to build debug python
+  exit /B 1
+)
+echo building release...
+msbuild.exe "%python_src%\PCbuild\pcbuild.proj" /t:Build /m /nologo /v:m /p:Configuration=Release /p:Platform=x64 /p:IncludeExternals=true /p:IncludeSSL=true /p:IncludeTkinter=true /p:PlatformToolset=v141
+if %ERRORLEVEL% NEQ 0 (
+  echo Failed to build release python
+  exit /B 1
+)
+
+cd /d %python_src%
+echo installing PIP...
+.\PCBuild\amd64\Python.exe  -m ensurepip --upgrade
+if %ERRORLEVEL% NEQ 0 (
+  echo Failed to ensure pip is present.
+  exit /B 1
+)
+.\PCBuild\amd64\Python.exe -m pip install --upgrade pip
+
+echo creating the installation image...
+rem We'll actually use the real python dist builder to do this:
+cd /d %python_src%
+.\PCBuild\amd64\python.exe .\PC\layout\main.py --copy %outputdir%\python -v -d --include-stable --include-pip --include-distutils --include-tcltk --include-idle --include-tools --include-venv --include-dev --include-launchers
+if %ERRORLEVEL% NEQ 0 (
+  echo "Failed to call python's layout script (debug)"
+  exit /B 1
+)
+
+.\PCBuild\amd64\python.exe .\PC\layout\main.py --copy %outputdir%\python -v --include-stable --include-pip --include-distutils --include-tcltk --include-idle --include-tools --include-venv --include-dev --include-launchers
+if %ERRORLEVEL% NEQ 0 (
+  echo "Failed to call python's layout script (release)"
+  exit /B 1
+)
+
+echo copying package metadata and cmake files...
+rem But we do add our own few things...
+set ROBOCOPY_OPTIONS=/NJH /NJS /NP /NDL
+robocopy %ScriptDir% %outputdir% *.cmake PackageInfo.json %ROBOCOPY_OPTIONS%
+
+cd /d %ScriptDir%
+
+echo clearing temp dir...
+rmdir /s /q %tempdir%
+
+rem we leave only the output folder which is the actual output for packaging.
+echo this folder is ready for packaging: %outputdir%
+
+exit /B 0

+ 39 - 0
package-system/python/win_x64/python-config-version.cmake

@@ -0,0 +1,39 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file is called to make sure that if we request a specific version
+# we respond only to that version
+
+set(PACKAGE_VERSION 3.7.10)
+set(PACKAGE_VERSION_EXACT False)
+set(PACKAGE_VERSION_COMPATIBLE False)
+
+if (NOT ${PACKAGE_FIND_NAME} STREQUAL "Python")
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 0 AND NOT PACKAGE_FIND_VERSION_MAJOR EQUAL 3)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 1 AND NOT PACKAGE_FIND_VERSION_MINOR EQUAL 7)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 2 AND NOT PACKAGE_FIND_VERSION_PATCH EQUAL 10)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION_COUNT GREATER 3)
+    return()
+endif()
+
+if (PACKAGE_FIND_VERSION VERSION_EQUAL PACKAGE_VERSION)
+    set(PACKAGE_VERSION_EXACT TRUE)
+endif()
+
+set(PACKAGE_VERSION_COMPATIBLE TRUE)

+ 62 - 0
package-system/python/win_x64/python-config.cmake

@@ -0,0 +1,62 @@
+#
+# Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
+# 
+# SPDX-License-Identifier: Apache-2.0 OR MIT
+#
+#
+
+# this file actually ingests the library and defines targets.
+set(MY "Python")
+set(TARGET_WITH_NAMESPACE "3rdParty::${MY}")
+if (TARGET ${TARGET_WITH_NAMESPACE})
+    return()
+endif()
+
+# this FindPython file is designed to be compatible with the base FindPython
+# to at least some degree.  As such, it uses the same variable names:
+
+# this script defines:
+# Python_EXECUTABLE - full path to executable
+# Python_INTERPRETER_ID - "Python"
+# Python_HOME - Where the python folder root is (ie, folder has subfolder of 'Lib')
+# Python_PATHS - Where sys.path should point at to find modules, libraries, etc.
+# Python_Development_FOUND - The platform we are cross compiling for can link to python
+# and a target called 3rdParty::Python that you can use to depend on
+
+set(${MY}_VERSION 3.7.10)
+set(${MY}_INTERPRETER_ID    "Python")
+set(${MY}_EXECUTABLE        ${CMAKE_CURRENT_LIST_DIR}/python/python.exe)
+set(${MY}_HOME              ${CMAKE_CURRENT_LIST_DIR}/python)
+set(${MY}_PATHS             ${CMAKE_CURRENT_LIST_DIR}/python/Lib
+                            ${CMAKE_CURRENT_LIST_DIR}/python/Lib/site-packages
+                            ${CMAKE_CURRENT_LIST_DIR}/python/DLLs) 
+
+# only if we're compiling FOR on one of the available platforms, add the target and libraries:
+if (${PAL_PLATFORM_NAME} STREQUAL "Windows" )
+    set(${MY}_Development_FOUND TRUE)
+    # Do not use these  PYTHON_LIBRARY_* or other variables, instead, use the 
+    # target '3rdParty::Python'
+    set(${MY}_LIBRARY_DEBUG   ${CMAKE_CURRENT_LIST_DIR}/python/libs/python37_d.lib)
+    set(${MY}_LIBRARY_RELEASE ${CMAKE_CURRENT_LIST_DIR}/python/libs/python37.lib)
+    set(${MY}_INCLUDE_DIR     ${CMAKE_CURRENT_LIST_DIR}/python/include)
+    set(${MY}_DYLIBS_DEBUG    ${CMAKE_CURRENT_LIST_DIR}/python/python37_d.dll ${CMAKE_CURRENT_LIST_DIR}/python/python3_d.dll)
+    set(${MY}_DYLIBS_RELEASE  ${CMAKE_CURRENT_LIST_DIR}/python/python37.dll ${CMAKE_CURRENT_LIST_DIR}/python/python3.dll)
+
+    set(${MY}_COMPILE_DEFINITIONS DEFAULT_LY_PYTHONHOME="${CMAKE_CURRENT_LIST_DIR}/python")
+
+    # the rest of this file could be reused for almost any target:
+    # we set it to a generator expression for multi-config situations:
+    set(${MY}_LIBRARY "$<IF:$<CONFIG:Debug>,${${MY}_LIBRARY_DEBUG},${${MY}_LIBRARY_RELEASE}>")
+    set(${MY}_DYLIBS "$<IF:$<CONFIG:Debug>,${${MY}_DYLIBS_DEBUG},${${MY}_DYLIBS_RELEASE}>")
+
+    # now set up the target using the above declarations....
+    add_library(${TARGET_WITH_NAMESPACE} INTERFACE IMPORTED GLOBAL)
+    ly_target_include_system_directories(TARGET ${TARGET_WITH_NAMESPACE} INTERFACE ${${MY}_INCLUDE_DIR})
+    target_link_libraries(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_LIBRARY}")
+    target_compile_definitions(${TARGET_WITH_NAMESPACE} INTERFACE "${${MY}_COMPILE_DEFINITIONS}")
+
+    # we also need to add the python dlls to be copied to the binaries folder...
+    set_target_properties(${TARGET_WITH_NAMESPACE} PROPERTIES INTERFACE_IMPORTED_LOCATION "${${MY}_DYLIBS}")
+endif()
+
+set(${MY}_FOUND True)

+ 12 - 4
package_build_list_host_darwin.json

@@ -19,11 +19,15 @@
         "OpenSSL-1.1.1b-rev2-ios": "package-system/OpenSSL/build_package_image.py --platform ios",
         "PhysX-4.1.2.29882248-rev3-mac": "package-system/PhysX/build_package_image.py --platform mac",
         "PhysX-4.1.2.29882248-rev3-ios": "package-system/PhysX/build_package_image.py --platform ios",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-mac": "package-system/NvCloth/build_package_image.py --platform-name mac",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-ios": "package-system/NvCloth/build_package_image.py --platform-name ios",
+        "poly2tri-7f0487a-rev1-mac": "package-system/poly2tri/build_package_image.py --platform-name mac",
+        "v-hacd-2.3-1a49edf-rev1-mac": "package-system/v-hacd/build_package_image.py --platform-name mac",
         "SPIRVCross-2021.04.29-rev1-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/SPIRVCross --platform-name Mac --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-mac": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Mac --package-root ../../package-system  --clean",
         "tiff-4.2.0.10-mac" : "package-system/tiff/build_package_image.py --platform mac",
         "tiff-4.2.0.10-ios" : "package-system/tiff/build_package_image.py --platform ios",
-        "python-3.7.10-rev1-darwin" : "python/build_package_image.py",
+        "python-3.7.10-rev1-darwin" : "package-system/python/build_package_image.py",
         "mcpp-2.7.2_az.1-rev1-mac": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "mikkelsen-1.0.0.4-mac": "mikkelsen/build_package_image.py --platform mac",
         "mikkelsen-1.0.0.4-ios": "mikkelsen/build_package_image.py --platform ios"  
@@ -47,19 +51,23 @@
         "OpenSSL-1.1.1b-rev2-ios": "package-system/OpenSSL-ios",
         "tiff-4.2.0.10-mac" : "package-system/tiff-mac",
         "tiff-4.2.0.10-ios" : "package-system/tiff-ios",
-        "python-3.7.10-rev1-darwin" : "python/darwin_x64/package",
+        "python-3.7.10-rev1-darwin" : "package-system/python/darwin_x64/package",
         "asn1-0.9.27-rev2-ios" : "package-system/asn1-ios",
         "ASTCEncoder-2017_11_14-rev2-multiplatform" : "package-system/ASTCEncoder-multiplatform",
         "PhysX-4.1.2.29882248-rev3-mac": "package-system/PhysX-mac",
         "PhysX-4.1.2.29882248-rev3-ios": "package-system/PhysX-ios",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-mac": "package-system/NvCloth-mac",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-ios": "package-system/NvCloth-ios",
         "mikkelsen-1.0.0.4-mac": "package-system/mikkelsen-mac",
         "mikkelsen-1.0.0.4-ios": "package-system/mikkelsen-ios",
+        "poly2tri-7f0487a-rev1-mac": "package-system/poly2tri-mac",
+        "v-hacd-2.3-1a49edf-rev1-mac": "package-system/v-hacd-mac",
         "mcpp-2.7.2_az.1-rev1-mac": "package-system/mcpp-mac",
         "SPIRVCross-2021.04.29-rev1-mac": "package-system/SPIRVCross-mac",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-mac": "package-system/DirectXShaderCompilerDxc-mac",
-        "azslc-1.7.22-rev1-multiplatform" : "package-system/azslc-multiplatform",
+        "azslc-1.7.23-rev1-multiplatform" : "package-system/azslc-multiplatform",
         "SQLite-3.32.2-rev3-multiplatform" : "package-system/SQLite-multiplatform",
         "xxhash-0.7.4-rev1-multiplatform":  "package-system/xxhash-multiplatform",
-        "qt-5.15.2-rev4-mac": "package-system/qt-mac"
+        "qt-5.15.2-rev5-mac": "package-system/qt-mac"
     }
 }

+ 11 - 5
package_build_list_host_linux.json

@@ -1,7 +1,7 @@
 {
     "comment" : "This is the list that applies to linux hosts",
     "build_from_source" : {
-        "AWSNativeSDK-1.7.167-rev4-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux --package-root ../../package-system --clean",
+        "AWSNativeSDK-1.7.167-rev5-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Linux --package-root ../../package-system --clean",
         "Lua-5.3.5-rev5-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/Lua --platform-name Linux --package-root ../../package-system --clean",
         "AwsIotDeviceSdkCpp-1.12.2-rev1-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AwsIotDeviceSdkCpp --platform-name Linux --package-root ../../package-system --clean",
         "etc2comp-9cd0f9cae0-rev1-linux" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/etc2comp --platform-name Linux --package-root ../../package-system --clean",
@@ -12,15 +12,18 @@
         "mcpp-2.7.2_az.1-rev1-linux": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "OpenSSL-1.1.1b-rev2-linux": "package-system/OpenSSL/build_package_image.py",
         "PhysX-4.1.2.29882248-rev3-linux": "package-system/PhysX/build_package_image.py --platform-name linux",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux": "package-system/NvCloth/build_package_image.py --platform-name linux",
+        "poly2tri-7f0487a-rev1-linux": "package-system/poly2tri/build_package_image.py --platform-name linux",
+        "v-hacd-2.3-1a49edf-rev1-linux": "package-system/v-hacd/build_package_image.py --platform-name linux",
         "SPIRVCross-2021.04.29-rev1-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/SPIRVCross --platform-name Linux --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-linux": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Linux --package-root ../../package-system --clean",
         "tiff-4.2.0.10-linux" : "package-system/tiff/build_package_image.py --platform linux",
-        "python-3.7.10-rev2-linux" : "python/build_package_image.py",
+        "python-3.7.10-rev2-linux" : "package-system/python/build_package_image.py",
         "mikkelsen-1.0.0.4-linux": "mikkelsen/build_package_image.py"
     },
     "build_from_folder" : {
         "AWSGameLiftServerSDK-3.4.1-rev1-linux" : "package-system/AWSGameLiftServerSDK/linux",
-        "AWSNativeSDK-1.7.167-rev4-linux" : "package-system/AWSNativeSDK-linux",
+        "AWSNativeSDK-1.7.167-rev5-linux" : "package-system/AWSNativeSDK-linux",
         "Lua-5.3.5-rev5-linux": "package-system/Lua-linux",
         "AwsIotDeviceSdkCpp-1.12.2-rev1-linux": "package-system/AwsIotDeviceSdkCpp-linux",
         "etc2comp-9cd0f9cae0-rev1-linux" : "package-system/etc2comp-linux",
@@ -33,12 +36,15 @@
         "SPIRVCross-2021.04.29-rev1-linux": "package-system/SPIRVCross-linux",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-linux": "package-system/DirectXShaderCompilerDxc-linux",
         "tiff-4.2.0.10-linux" : "package-system/tiff-linux",
-        "python-3.7.10-rev2-linux" : "python/linux_x64/package",
+        "python-3.7.10-rev2-linux" : "package-system/python/linux_x64/package",
         "PhysX-4.1.2.29882248-rev3-linux": "package-system/PhysX-linux",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-linux": "package-system/NvCloth-linux",
         "mikkelsen-1.0.0.4-linux": "package-system/mikkelsen-linux",
+        "poly2tri-7f0487a-rev1-linux": "package-system/poly2tri-linux",
+        "v-hacd-2.3-1a49edf-rev1-linux": "package-system/v-hacd-linux",
         "unwind-1.2.1-linux": "package-system/unwind-linux",
         "SQLite-3.32.2-rev3-multiplatform" : "package-system/SQLite-multiplatform",
         "xxhash-0.7.4-rev1-multiplatform": "package-system/xxhash-multiplatform",
-        "qt-5.15.2-rev4-linux": "package-system/qt-linux"
+        "qt-5.15.2-rev5-linux": "package-system/qt-linux"
     }
 }

+ 20 - 15
package_build_list_host_windows.json

@@ -5,7 +5,7 @@
     "comment4" : "Note:  Build from source occurs before build_from_folder",
     "build_from_source" : {
         "AWSNativeSDK-1.7.167-rev3-windows" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Windows --package-root ../../package-system --clean",
-        "AWSNativeSDK-1.7.167-rev4-android" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Android --package-root ../../package-system --clean",
+        "AWSNativeSDK-1.7.167-rev6-android" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/AWSNativeSDK --platform-name Android --package-root ../../package-system --clean",
         "Blast-v1.1.7_rc2-9-geb169fe-rev1-windows": "package-system/Blast/build_package_image.py --platform-name windows",
         "Crashpad-0.8.0-rev1-windows" : "package-system/Crashpad/build_package_image.py",
         "Lua-5.3.5-rev5-windows" : "Scripts/extras/pull_and_build_from_git.py ../../package-system/Lua --platform-name Windows --package-root ../../package-system --clean",
@@ -23,14 +23,16 @@
         "libsamplerate-0.2.1-rev2-android": "Scripts/extras/pull_and_build_from_git.py ../../package-system/libsamplerate --platform-name Android --package-root ../../package-system --custom-toolchain-file ../../Scripts/cmake/Platform/Android/Toolchain_android.cmake --clean",
         "mcpp-2.7.2_az.1-rev1-windows": "package-system/mcpp/get_and_build_mcpp.py mcpp-2.7.2_az.1-rev1",
         "OpenSSL-1.1.1b-rev2-windows": "package-system/OpenSSL/build_package_image.py",
-        "OpenSSL-1.1.1b-rev2-android": "package-system/OpenSSL/build_package_image.py --platform-name android",
+        "OpenSSL-1.1.1b-rev1-android": "package-system/OpenSSL/build_package_image.py --platform-name android",
         "SPIRVCross-2021.04.29-rev1-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/SPIRVCross --platform-name Windows --package-root ../../package-system --clean",
         "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-windows": "Scripts/extras/pull_and_build_from_git.py ../../package-system/DirectXShaderCompiler --platform-name Windows --package-root ../../package-system --clean",
-        "tiff-4.2.0.10-windows" : "package-system/tiff/build_package_image.py",
-        "tiff-4.2.0.10-android" : "package-system/tiff/build_package_image.py --platform android",
         "PhysX-4.1.2.29882248-rev3-windows" : "package-system/PhysX/build_package_image.py --platform windows",
         "PhysX-4.1.2.29882248-rev3-android" : "package-system/PhysX/build_package_image.py --platform android",
-        "python-3.7.10-rev1-windows" : "python/build_package_image.py",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows": "package-system/NvCloth/build_package_image.py --platform-name windows",
+        "NvCloth-v1.1.6-4-gd243404-pr58-rev1-android": "package-system/NvCloth/build_package_image.py --platform-name android",
+        "poly2tri-7f0487a-rev1-windows": "package-system/poly2tri/build_package_image.py --platform-name windows",
+        "v-hacd-2.3-1a49edf-rev1-windows": "package-system/v-hacd/build_package_image.py --platform-name windows",
+        "python-3.7.10-rev1-windows" : "package-system/python/build_package_image.py",
         "amd-ags-5.4.1-rev2-windows" : "package-system/amd-ags-windows/build_package_image.py",
         "mikkelsen-1.0.0.4-windows": "mikkelsen/build_package_image.py",
         "mikkelsen-1.0.0.4-android": "mikkelsen/build_package_image.py --platform android"
@@ -38,7 +40,7 @@
   "build_from_folder": {
     "AWSGameLiftServerSDK-3.4.1-rev1-windows" : "package-system/AWSGameLiftServerSDK/windows",
     "AWSNativeSDK-1.7.167-rev3-windows": "package-system/AWSNativeSDK-windows",
-    "AWSNativeSDK-1.7.167-rev4-android": "package-system/AWSNativeSDK-android",
+    "AWSNativeSDK-1.7.167-rev6-android": "package-system/AWSNativeSDK-android",
     "Blast-v1.1.7_rc2-9-geb169fe-rev1-windows": "package-system/Blast-windows",
     "Crashpad-0.8.0-rev1-windows" : "package-system/Crashpad-windows",
     "Lua-5.3.5-rev5-windows": "package-system/Lua-windows",
@@ -55,25 +57,28 @@
     "libsamplerate-0.2.1-rev2-windows": "package-system/libsamplerate-windows",
     "libsamplerate-0.2.1-rev2-android": "package-system/libsamplerate-android",
     "OpenSSL-1.1.1b-rev2-windows": "package-system/OpenSSL-windows",
-    "OpenSSL-1.1.1b-rev2-android": "package-system/OpenSSL-android",
-    "tiff-4.2.0.10-windows": "package-system/tiff-windows",
-    "tiff-4.2.0.10-android": "package-system/tiff-android",
+    "OpenSSL-1.1.1b-rev1-android": "package-system/OpenSSL-android",
+    "tiff-4.2.0.14-android": "package-system/tiff-android",
+    "tiff-4.2.0.15-linux": "package-system/tiff-linux",
+    "tiff-4.2.0.15-mac-ios": "package-system/tiff-mac-ios",
+    "tiff-4.2.0.14-windows": "package-system/tiff-windows",
     "lux_core-2.2-rev5-multiplatform": "package-system/luxcore-multiplatform",
-    "python-3.7.10-rev1-windows": "python/win_x64/package",
+    "python-3.7.10-rev1-windows": "package-system/python/win_x64/package",
     "pybind11-2.4.3-rev1-multiplatform": "package-system/pybind11-multiplatform",
     "zlib-1.2.8-rev2-multiplatform": "zlib/zlib-multiplatform",
     "alembic-1.7.11-rev3-multiplatform": "package-system/alembic-multiplatform",
     "hdf5-1.0.11-rev2-multiplatform": "package-system/hdf5-multiplatform",
     "ilmbase-2.3.0-rev4-multiplatform": "package-system/ilmbase-multiplatform",
     "amd-ags-5.4.1-rev2-windows": "package-system/amd-ags-windows/package",
-    "assimp-5.0.1-rev9-multiplatform": "package-system/assimp-multiplatform",
+    "assimp-5.0.1-rev11-multiplatform": "package-system/assimp-multiplatform",
     "squish-ccr-20150601-rev3-multiplatform": "package-system/squish-ccr-multiplatform",
     "md5-2.0-multiplatform": "package-system/md5-multiplatform",
     "RapidJSON-1.1.0-multiplatform": "package-system/RapidJSON-multiplatform",
     "RapidXML-1.13-multiplatform": "package-system/RapidXML-multiplatform",
     "PhysX-4.1.2.29882248-rev3-windows" : "package-system/PhysX-windows",
     "PhysX-4.1.2.29882248-rev3-android" : "package-system/PhysX-android",
-    "NvCloth-1.1.6-rev2-multiplatform": "package-system/NvCloth-multiplatform",
+    "NvCloth-v1.1.6-4-gd243404-pr58-rev1-windows": "package-system/NvCloth-windows",
+    "NvCloth-v1.1.6-4-gd243404-pr58-rev1-android": "package-system/NvCloth-android",
     "mikkelsen-1.0.0.4-windows": "package-system/mikkelsen-windows",
     "mikkelsen-1.0.0.4-android": "package-system/mikkelsen-android",
     "OpenMesh-8.1-rev1-windows": "package-system/OpenMesh-windows",
@@ -84,12 +89,12 @@
     "civetweb-1.8-rev1-windows": "package-system/civetweb-windows",
     "lz4-r128-multiplatform": "package-system/lz4-multiplatform",
     "expat-2.1.0-multiplatform": "package-system/expat-multiplatform",
-    "poly2tri-0.3.3-rev2-multiplatform": "package-system/poly2tri-multiplatform",
+    "poly2tri-7f0487a-rev1-windows": "package-system/poly2tri-windows",
     "openimageio-2.1.16.0-rev2-windows": "package-system/openimageio-windows",
-    "v-hacd-2.0-rev1-multiplatform": "package-system/v-hacd-multiplatform",
+    "v-hacd-2.3-1a49edf-rev1-windows": "package-system/v-hacd-windows",
     "SPIRVCross-2021.04.29-rev1-windows": "package-system/SPIRVCross-windows",
     "DirectXShaderCompilerDxc-1.6.2104-o3de-rev2-windows": "package-system/DirectXShaderCompilerDxc-windows",
-    "azslc-1.7.22-rev1-multiplatform": "package-system/azslc-multiplatform",
+    "azslc-1.7.23-rev1-multiplatform": "package-system/azslc-multiplatform",
     "zstd-1.35-multiplatform": "package-system/zstd-multiplatform",
     "SQLite-3.32.2-rev3-multiplatform": "package-system/SQLite-multiplatform",
     "glad-2.0.0-beta-rev2-multiplatform": "package-system/glad-multiplatform",