[INSTALL] Fix setupvars (installation for MacOS) and build python (#16514)
* Fix installation + Python build on MacOS * Update setupvars.sh * Update setupvars.sh * Revert * revert * Update scripts/setupvars/setupvars.sh --------- Co-authored-by: Ilya Lavrenov <ilya.lavrenov@intel.com>
This commit is contained in:
parent
a2218ab169
commit
3849d5aa02
@ -4,12 +4,12 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
abs_path () {
|
||||
path=$(eval echo "$1")
|
||||
directory=$(dirname "$path")
|
||||
echo "$(cd "$directory" || exit; pwd -P)/$(basename "$path")";
|
||||
script_path=$(eval echo "$1")
|
||||
directory=$(dirname "$script_path")
|
||||
echo "$(cd "$directory" || exit; pwd -P)";
|
||||
}
|
||||
|
||||
SCRIPT_DIR="$( cd "$( dirname "$(abs_path "${BASH_SOURCE[0]}")" )" >/dev/null 2>&1 && pwd )"
|
||||
SCRIPT_DIR="$(abs_path "${BASH_SOURCE[0]}")" >/dev/null 2>&1
|
||||
INSTALLDIR="${SCRIPT_DIR}"
|
||||
export INTEL_OPENVINO_DIR="$INSTALLDIR"
|
||||
|
||||
@ -121,7 +121,12 @@ check_python_version () {
|
||||
"${PYTHON_VERSION_MAJOR}.${MAX_SUPPORTED_PYTHON_VERSION_MINOR} (64-bit) from https://www.python.org/downloads/"
|
||||
return 0
|
||||
fi
|
||||
python_bitness=$(python"$python_version" -c 'import sys; print(64 if sys.maxsize > 2**32 else 32)')
|
||||
if command -v python"$python_version" > /dev/null 2>&1; then
|
||||
python_interp=python"$python_version"
|
||||
else
|
||||
python_interp=python"$python_version_major"
|
||||
fi
|
||||
python_bitness=$("$python_interp" -c 'import sys; print(64 if sys.maxsize > 2**32 else 32)')
|
||||
|
||||
if [ "$python_bitness" != "" ] && [ "$python_bitness" != "64" ] && [ "$OS_NAME" != "Raspbian" ]; then
|
||||
echo "[setupvars.sh] WARNING: 64 bitness for Python $python_version is required"
|
||||
@ -144,7 +149,7 @@ check_python_version () {
|
||||
echo "[setupvars.sh] WARNING: OpenVINO Python environment does not set properly"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
python_version_to_check="$python_version"
|
||||
if [ -z "$python_version" ]; then
|
||||
|
@ -36,7 +36,8 @@ if( PYTHONINTERP_FOUND )
|
||||
file(TO_CMAKE_PATH "$ENV{HOME}" ENV_HOME)
|
||||
find_host_program( CYTHON_EXECUTABLE
|
||||
NAMES cython cython.bat cython3
|
||||
HINTS ${_python_path} ${ENV_HOME}/.local/bin $ENV{HOMEBREW_OPT}/cython/bin
|
||||
HINTS ${_python_path} ${ENV_HOME}/.local/bin $ENV{HOMEBREW_OPT}/cython/bin
|
||||
${ENV_HOME}/Library/Python/${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/bin
|
||||
)
|
||||
else()
|
||||
find_host_program( CYTHON_EXECUTABLE
|
||||
|
@ -22,6 +22,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
|
||||
ie_add_compiler_flags(/wd4267)
|
||||
ie_add_compiler_flags(/wd4244)
|
||||
endif()
|
||||
if (OV_COMPILER_IS_CLANG OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
ie_add_compiler_flags(-Wno-undef)
|
||||
endif()
|
||||
if(UNUSED_BUT_SET_VARIABLE_SUPPORTED)
|
||||
ie_add_compiler_flags(-Wno-unused-but-set-variable)
|
||||
endif()
|
||||
|
Loading…
Reference in New Issue
Block a user